From 2f78c4b565d6afbdf7ebbd31107a95df3fcdea91 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Mon, 11 Mar 2024 12:48:10 +0500 Subject: [PATCH] npx hardhat docgen --- docs/evm/Zeta.non-eth.md | 21 ++ docs/evm/ZetaConnector.base.md | 15 +- docs/evm/ZetaConnector.eth.md | 15 +- docs/evm/ZetaConnector.non-eth.md | 23 +- docs/evm/interfaces/ZetaInterfaces.md | 7 + docs/evm/testing/AttackerContract.md | 100 ++++++++ docs/evm/testing/ERC20Mock.md | 51 ++++ .../ZetaTokenConsumerPancakeV3.strategy.md | 222 ++++++++++++++++++ docs/zevm/Interfaces.md | 54 ----- docs/zevm/ZRC20.md | 32 ++- docs/zevm/ZetaConnectorZEVM.md | 140 +++++++++++ docs/zevm/interfaces/IWZETA.md | 104 ++++++++ docs/zevm/interfaces/zContract.md | 15 +- docs/zevm/testing/SystemContractMock.md | 180 ++++++++++++++ docs/zevm/wzeta.md | 4 +- hardhat.config.ts | 4 + .../contracts/zevm/ConnectorZEVM.sol/index.ts | 5 + typechain-types/contracts/zevm/index.ts | 2 + .../contracts/zevm/ConnectorZEVM.sol/index.ts | 5 + .../zevm/ZRC20.sol/ZRC20__factory.ts | 2 +- .../factories/contracts/zevm/index.ts | 1 + typechain-types/hardhat.d.ts | 18 ++ typechain-types/index.ts | 8 +- yarn.lock | 8 + 24 files changed, 942 insertions(+), 94 deletions(-) create mode 100644 docs/evm/testing/AttackerContract.md create mode 100644 docs/evm/testing/ERC20Mock.md create mode 100644 docs/evm/tools/ZetaTokenConsumerPancakeV3.strategy.md create mode 100644 docs/zevm/ZetaConnectorZEVM.md create mode 100644 docs/zevm/interfaces/IWZETA.md create mode 100644 docs/zevm/testing/SystemContractMock.md create mode 100644 typechain-types/contracts/zevm/ConnectorZEVM.sol/index.ts create mode 100644 typechain-types/factories/contracts/zevm/ConnectorZEVM.sol/index.ts diff --git a/docs/evm/Zeta.non-eth.md b/docs/evm/Zeta.non-eth.md index 69cb606d..d5d54080 100644 --- a/docs/evm/Zeta.non-eth.md +++ b/docs/evm/Zeta.non-eth.md @@ -18,6 +18,9 @@ Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm * [Minted(mintee, amount, internalSendHash)](#ZetaNonEth-Minted-address-uint256-bytes32-) * [Burnt(burnee, amount)](#ZetaNonEth-Burnt-address-uint256-) +* [TSSAddressUpdated(callerAddress, newTssAddress)](#ZetaNonEth-TSSAddressUpdated-address-address-) +* [TSSAddressUpdaterUpdated(callerAddress, newTssUpdaterAddress)](#ZetaNonEth-TSSAddressUpdaterUpdated-address-address-) +* [ConnectorAddressUpdated(callerAddress, newConnectorAddress)](#ZetaNonEth-ConnectorAddressUpdated-address-address-) * [Transfer(from, to, value)](#IERC20-Transfer-address-address-uint256-) * [Approval(owner, spender, value)](#IERC20-Approval-address-address-uint256-) @@ -81,6 +84,24 @@ Burnt(address indexed burnee, uint256 amount) (event) +``` +TSSAddressUpdated(address callerAddress, address newTssAddress) (event) +``` + + + +``` +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +ConnectorAddressUpdated(address callerAddress, address newConnectorAddress) (event) +``` + + + ``` Transfer(address indexed from, address indexed to, uint256 value) (event) ``` diff --git a/docs/evm/ZetaConnector.base.md b/docs/evm/ZetaConnector.base.md index ab3f1cf0..c2725de2 100644 --- a/docs/evm/ZetaConnector.base.md +++ b/docs/evm/ZetaConnector.base.md @@ -33,8 +33,9 @@ There's an instance of this contract on each chain supported by ZetaChain. * [ZetaSent(sourceTxOriginAddress, zetaTxSenderAddress, destinationChainId, destinationAddress, zetaValueAndGas, destinationGasLimit, message, zetaParams)](#ZetaConnectorBase-ZetaSent-address-address-uint256-bytes-uint256-uint256-bytes-bytes-) * [ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReceived-bytes-uint256-address-uint256-bytes-bytes32-) * [ZetaReverted(zetaTxSenderAddress, sourceChainId, destinationChainId, destinationAddress, remainingZetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReverted-address-uint256-uint256-bytes-uint256-bytes-bytes32-) -* [TSSAddressUpdated(zetaTxSenderAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) -* [PauserAddressUpdated(updaterAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) +* [TSSAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) +* [TSSAddressUpdaterUpdated(callerAddress, newTssUpdaterAddress)](#ZetaConnectorBase-TSSAddressUpdaterUpdated-address-address-) +* [PauserAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) * [Paused(account)](#Pausable-Paused-address-) * [Unpaused(account)](#Pausable-Unpaused-address-) @@ -172,13 +173,19 @@ ZetaReverted(address zetaTxSenderAddress, uint256 sourceChainId, uint256 indexed ``` -TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress) (event) +TSSAddressUpdated(address callerAddress, address newTssAddress) (event) ``` ``` -PauserAddressUpdated(address updaterAddress, address newTssAddress) (event) +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) ``` diff --git a/docs/evm/ZetaConnector.eth.md b/docs/evm/ZetaConnector.eth.md index f6a1bbe9..ea4112fd 100644 --- a/docs/evm/ZetaConnector.eth.md +++ b/docs/evm/ZetaConnector.eth.md @@ -23,8 +23,9 @@ This version is only for Ethereum network because in the other chains we mint an * [ZetaSent(sourceTxOriginAddress, zetaTxSenderAddress, destinationChainId, destinationAddress, zetaValueAndGas, destinationGasLimit, message, zetaParams)](#ZetaConnectorBase-ZetaSent-address-address-uint256-bytes-uint256-uint256-bytes-bytes-) * [ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReceived-bytes-uint256-address-uint256-bytes-bytes32-) * [ZetaReverted(zetaTxSenderAddress, sourceChainId, destinationChainId, destinationAddress, remainingZetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReverted-address-uint256-uint256-bytes-uint256-bytes-bytes32-) -* [TSSAddressUpdated(zetaTxSenderAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) -* [PauserAddressUpdated(updaterAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) +* [TSSAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) +* [TSSAddressUpdaterUpdated(callerAddress, newTssUpdaterAddress)](#ZetaConnectorBase-TSSAddressUpdaterUpdated-address-address-) +* [PauserAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) * [Paused(account)](#Pausable-Paused-address-) * [Unpaused(account)](#Pausable-Unpaused-address-) @@ -104,13 +105,19 @@ ZetaReverted(address zetaTxSenderAddress, uint256 sourceChainId, uint256 indexed ``` -TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress) (event) +TSSAddressUpdated(address callerAddress, address newTssAddress) (event) ``` ``` -PauserAddressUpdated(address updaterAddress, address newTssAddress) (event) +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) ``` diff --git a/docs/evm/ZetaConnector.non-eth.md b/docs/evm/ZetaConnector.non-eth.md index 49c526c3..c0e389ef 100644 --- a/docs/evm/ZetaConnector.non-eth.md +++ b/docs/evm/ZetaConnector.non-eth.md @@ -21,11 +21,14 @@ This version is for every chain but Etherum network because in the other chains ### Event List +* [MaxSupplyUpdated(callerAddress, newMaxSupply)](#ZetaConnectorNonEth-MaxSupplyUpdated-address-uint256-) + * [ZetaSent(sourceTxOriginAddress, zetaTxSenderAddress, destinationChainId, destinationAddress, zetaValueAndGas, destinationGasLimit, message, zetaParams)](#ZetaConnectorBase-ZetaSent-address-address-uint256-bytes-uint256-uint256-bytes-bytes-) * [ZetaReceived(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReceived-bytes-uint256-address-uint256-bytes-bytes32-) * [ZetaReverted(zetaTxSenderAddress, sourceChainId, destinationChainId, destinationAddress, remainingZetaValue, message, internalSendHash)](#ZetaConnectorBase-ZetaReverted-address-uint256-uint256-bytes-uint256-bytes-bytes32-) -* [TSSAddressUpdated(zetaTxSenderAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) -* [PauserAddressUpdated(updaterAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) +* [TSSAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-TSSAddressUpdated-address-address-) +* [TSSAddressUpdaterUpdated(callerAddress, newTssUpdaterAddress)](#ZetaConnectorBase-TSSAddressUpdaterUpdated-address-address-) +* [PauserAddressUpdated(callerAddress, newTssAddress)](#ZetaConnectorBase-PauserAddressUpdated-address-address-) * [Paused(account)](#Pausable-Paused-address-) * [Unpaused(account)](#Pausable-Unpaused-address-) @@ -94,6 +97,12 @@ To perform the transfer mint new tokens, validating first the maxSupply allowed ### Events +``` +MaxSupplyUpdated(address callerAddress, uint256 newMaxSupply) (event) +``` + + + ``` ZetaSent(address sourceTxOriginAddress, address indexed zetaTxSenderAddress, uint256 indexed destinationChainId, bytes destinationAddress, uint256 zetaValueAndGas, uint256 destinationGasLimit, bytes message, bytes zetaParams) (event) ``` @@ -113,13 +122,19 @@ ZetaReverted(address zetaTxSenderAddress, uint256 sourceChainId, uint256 indexed ``` -TSSAddressUpdated(address zetaTxSenderAddress, address newTssAddress) (event) +TSSAddressUpdated(address callerAddress, address newTssAddress) (event) ``` ``` -PauserAddressUpdated(address updaterAddress, address newTssAddress) (event) +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) ``` diff --git a/docs/evm/interfaces/ZetaInterfaces.md b/docs/evm/interfaces/ZetaInterfaces.md index d5c8a58d..35df976b 100644 --- a/docs/evm/interfaces/ZetaInterfaces.md +++ b/docs/evm/interfaces/ZetaInterfaces.md @@ -87,6 +87,7 @@ The interface can be implemented using different strategies, like UniswapV2, Uni * [getZetaFromToken(destinationAddress, minAmountOut, inputToken, inputTokenAmount)](#ZetaTokenConsumer-getZetaFromToken-address-uint256-address-uint256-) * [getEthFromZeta(destinationAddress, minAmountOut, zetaTokenAmount)](#ZetaTokenConsumer-getEthFromZeta-address-uint256-uint256-) * [getTokenFromZeta(destinationAddress, minAmountOut, outputToken, zetaTokenAmount)](#ZetaTokenConsumer-getTokenFromZeta-address-uint256-address-uint256-) +* [hasZetaLiquidity()](#ZetaTokenConsumer-hasZetaLiquidity--) ### Event List @@ -123,6 +124,12 @@ getTokenFromZeta(address destinationAddress, uint256 minAmountOut, address outpu +``` +hasZetaLiquidity() → bool (external function) +``` + + + ### Events ``` diff --git a/docs/evm/testing/AttackerContract.md b/docs/evm/testing/AttackerContract.md new file mode 100644 index 00000000..bb705bdd --- /dev/null +++ b/docs/evm/testing/AttackerContract.md @@ -0,0 +1,100 @@ +## Victim + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/testing/AttackerContract.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/testing/AttackerContract.sol + +### Function List + +* [deposit(recipient, asset, amount, message)](#Victim-deposit-bytes-address-uint256-bytes-) +* [withdraw(recipient, asset, amount)](#Victim-withdraw-address-address-uint256-) + +### Modifiers + +### Functions + +``` +deposit(bytes recipient, address asset, uint256 amount, bytes message) (external function) +``` + + + +``` +withdraw(address recipient, address asset, uint256 amount) (external function) +``` + + + +## AttackerContract + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/testing/AttackerContract.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/testing/AttackerContract.sol + +### Function List + +* [constructor(victimContractAddress_, wzeta, victimMethod)](#AttackerContract-constructor-address-address-uint256-) +* [receive()](#AttackerContract-receive--) +* [attackDeposit()](#AttackerContract-attackDeposit--) +* [attackWidrawal()](#AttackerContract-attackWidrawal--) +* [attack()](#AttackerContract-attack--) +* [balanceOf(account)](#AttackerContract-balanceOf-address-) +* [transferFrom(from, to, amount)](#AttackerContract-transferFrom-address-address-uint256-) +* [transfer(to, amount)](#AttackerContract-transfer-address-uint256-) + +### Modifiers + +### Functions + +``` +constructor(address victimContractAddress_, address wzeta, uint256 victimMethod) (public function) +``` + + + +``` +receive() (external function) +``` + + + +``` +attackDeposit() (internal function) +``` + + + +``` +attackWidrawal() (internal function) +``` + + + +``` +attack() (internal function) +``` + + + +``` +balanceOf(address account) → uint256 (external function) +``` + + + +``` +transferFrom(address from, address to, uint256 amount) → bool (public function) +``` + + + +``` +transfer(address to, uint256 amount) → bool (public function) +``` + + + diff --git a/docs/evm/testing/ERC20Mock.md b/docs/evm/testing/ERC20Mock.md new file mode 100644 index 00000000..236ad96c --- /dev/null +++ b/docs/evm/testing/ERC20Mock.md @@ -0,0 +1,51 @@ +## ERC20Mock + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/testing/ERC20Mock.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/testing/ERC20Mock.sol + +ZetaEth is an implementation of OpenZeppelin's ERC20 + +### Function List + +* [constructor(name, symbol, creator, initialSupply)](#ERC20Mock-constructor-string-string-address-uint256-) + +### Event List + +* [Transfer(from, to, value)](#IERC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IERC20-Approval-address-address-uint256-) + +### Modifiers + +### Functions + +``` +constructor(string name, string symbol, address creator, uint256 initialSupply) (public function) +``` + + + +### Events + +``` +Transfer(address indexed from, address indexed to, uint256 value) (event) +``` + + + +Emitted when `value` tokens are moved from one account (`from`) to +another (`to`). + +Note that `value` may be zero. + +``` +Approval(address indexed owner, address indexed spender, uint256 value) (event) +``` + + + +Emitted when the allowance of a `spender` for an `owner` is set by +a call to {approve}. `value` is the new allowance. + diff --git a/docs/evm/tools/ZetaTokenConsumerPancakeV3.strategy.md b/docs/evm/tools/ZetaTokenConsumerPancakeV3.strategy.md new file mode 100644 index 00000000..a78ec5d0 --- /dev/null +++ b/docs/evm/tools/ZetaTokenConsumerPancakeV3.strategy.md @@ -0,0 +1,222 @@ +## ZetaTokenConsumerUniV3Errors + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol + +### Error List + +* [InputCantBeZero()](#ZetaTokenConsumerUniV3Errors-InputCantBeZero--) +* [ErrorSendingETH()](#ZetaTokenConsumerUniV3Errors-ErrorSendingETH--) +* [ReentrancyError()](#ZetaTokenConsumerUniV3Errors-ReentrancyError--) + +### Modifiers + +### Errors + +``` +InputCantBeZero() (error) +``` + + + +``` +ErrorSendingETH() (error) +``` + + + +``` +ReentrancyError() (error) +``` + + + +## WETH9 + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol + +### Function List + +* [withdraw(wad)](#WETH9-withdraw-uint256-) + +### Modifiers + +### Functions + +``` +withdraw(uint256 wad) (external function) +``` + + + +## ISwapRouterPancake + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol + +### Function List + +* [exactInputSingle(params)](#ISwapRouterPancake-exactInputSingle-struct-ISwapRouterPancake-ExactInputSingleParams-) +* [exactInput(params)](#ISwapRouterPancake-exactInput-struct-ISwapRouterPancake-ExactInputParams-) + +### Modifiers + +### Functions + +``` +exactInputSingle(struct ISwapRouterPancake.ExactInputSingleParams params) → uint256 amountOut (external function) +``` + + + +``` +exactInput(struct ISwapRouterPancake.ExactInputParams params) → uint256 amountOut (external function) +``` + + + +## ZetaTokenConsumerPancakeV3 + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol + +Uniswap V3 strategy for ZetaTokenConsumer + +### Modifier List + +* [nonReentrant()](#ZetaTokenConsumerPancakeV3-nonReentrant--) + +### Function List + +* [constructor(zetaToken_, pancakeV3Router_, uniswapV3Factory_, WETH9Address_, zetaPoolFee_, tokenPoolFee_)](#ZetaTokenConsumerPancakeV3-constructor-address-address-address-address-uint24-uint24-) +* [receive()](#ZetaTokenConsumerPancakeV3-receive--) +* [getZetaFromEth(destinationAddress, minAmountOut)](#ZetaTokenConsumerPancakeV3-getZetaFromEth-address-uint256-) +* [getZetaFromToken(destinationAddress, minAmountOut, inputToken, inputTokenAmount)](#ZetaTokenConsumerPancakeV3-getZetaFromToken-address-uint256-address-uint256-) +* [getEthFromZeta(destinationAddress, minAmountOut, zetaTokenAmount)](#ZetaTokenConsumerPancakeV3-getEthFromZeta-address-uint256-uint256-) +* [getTokenFromZeta(destinationAddress, minAmountOut, outputToken, zetaTokenAmount)](#ZetaTokenConsumerPancakeV3-getTokenFromZeta-address-uint256-address-uint256-) +* [hasZetaLiquidity()](#ZetaTokenConsumerPancakeV3-hasZetaLiquidity--) + +### Event List + +* [EthExchangedForZeta(amountIn, amountOut)](#ZetaTokenConsumer-EthExchangedForZeta-uint256-uint256-) +* [TokenExchangedForZeta(token, amountIn, amountOut)](#ZetaTokenConsumer-TokenExchangedForZeta-address-uint256-uint256-) +* [ZetaExchangedForEth(amountIn, amountOut)](#ZetaTokenConsumer-ZetaExchangedForEth-uint256-uint256-) +* [ZetaExchangedForToken(token, amountIn, amountOut)](#ZetaTokenConsumer-ZetaExchangedForToken-address-uint256-uint256-) + +### Error List + +* [InputCantBeZero()](#ZetaTokenConsumerUniV3Errors-InputCantBeZero--) +* [ErrorSendingETH()](#ZetaTokenConsumerUniV3Errors-ErrorSendingETH--) +* [ReentrancyError()](#ZetaTokenConsumerUniV3Errors-ReentrancyError--) + +### Modifiers + +``` +nonReentrant() (modifier) +``` + + + +### Functions + +``` +constructor(address zetaToken_, address pancakeV3Router_, address uniswapV3Factory_, address WETH9Address_, uint24 zetaPoolFee_, uint24 tokenPoolFee_) (public function) +``` + + + +``` +receive() (external function) +``` + + + +``` +getZetaFromEth(address destinationAddress, uint256 minAmountOut) → uint256 (external function) +``` + + + +``` +getZetaFromToken(address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount) → uint256 (external function) +``` + + + +``` +getEthFromZeta(address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount) → uint256 (external function) +``` + + + +``` +getTokenFromZeta(address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount) → uint256 (external function) +``` + + + +``` +hasZetaLiquidity() → bool (external function) +``` + + + +### Events + +``` +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) (event) +``` + + + +### Errors + +``` +InputCantBeZero() (error) +``` + + + +``` +ErrorSendingETH() (error) +``` + + + +``` +ReentrancyError() (error) +``` + + + diff --git a/docs/zevm/Interfaces.md b/docs/zevm/Interfaces.md index eba9f9f8..208f879f 100644 --- a/docs/zevm/Interfaces.md +++ b/docs/zevm/Interfaces.md @@ -189,35 +189,6 @@ UpdatedProtocolFlatFee(uint256 protocolFlatFee) (event) -## Context - -```solidity -import "@zetachain/protocol-contracts/contracts/zevm/Interfaces.sol"; -``` - -Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/Interfaces.sol - -### Function List - -* [_msgSender()](#Context-_msgSender--) -* [_msgData()](#Context-_msgData--) - -### Modifiers - -### Functions - -``` -_msgSender() → address (internal function) -``` - - - -``` -_msgData() → bytes (internal function) -``` - - - ## IZRC20Metadata ```solidity @@ -317,28 +288,3 @@ enum CoinType { ERC20 } ``` -## zContract - -```solidity -import "@zetachain/protocol-contracts/contracts/zevm/Interfaces.sol"; -``` - -Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/Interfaces.sol - -Any ZetaChain Contract must implement this interface to allow SystemContract to interact with. -This is only required if the contract wants to interact with other chains. - -### Function List - -* [onCrossChainCall(zrc20, amount, message)](#zContract-onCrossChainCall-address-uint256-bytes-) - -### Modifiers - -### Functions - -``` -onCrossChainCall(address zrc20, uint256 amount, bytes message) (external function) -``` - - - diff --git a/docs/zevm/ZRC20.md b/docs/zevm/ZRC20.md index d404b7e7..6ceb3347 100644 --- a/docs/zevm/ZRC20.md +++ b/docs/zevm/ZRC20.md @@ -85,6 +85,8 @@ Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zev ### Function List +* [_msgSender()](#ZRC20-_msgSender--) +* [_msgData()](#ZRC20-_msgData--) * [constructor(name_, symbol_, decimals_, chainid_, coinType_, gasLimit_, systemContractAddress_)](#ZRC20-constructor-string-string-uint8-uint256-enum-CoinType-uint256-address-) * [name()](#ZRC20-name--) * [symbol()](#ZRC20-symbol--) @@ -94,8 +96,6 @@ Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zev * [transfer(recipient, amount)](#ZRC20-transfer-address-uint256-) * [allowance(owner, spender)](#ZRC20-allowance-address-address-) * [approve(spender, amount)](#ZRC20-approve-address-uint256-) -* [increaseAllowance(spender, amount)](#ZRC20-increaseAllowance-address-uint256-) -* [decreaseAllowance(spender, amount)](#ZRC20-decreaseAllowance-address-uint256-) * [transferFrom(sender, recipient, amount)](#ZRC20-transferFrom-address-address-uint256-) * [burn(amount)](#ZRC20-burn-uint256-) * [_transfer(sender, recipient, amount)](#ZRC20-_transfer-address-address-uint256-) @@ -142,6 +142,18 @@ Only fungible module modifier. ### Functions +``` +_msgSender() → address (internal function) +``` + + + +``` +_msgData() → bytes (internal function) +``` + + + ``` constructor(string name_, string symbol_, uint8 decimals_, uint256 chainid_, enum CoinType coinType_, uint256 gasLimit_, address systemContractAddress_) (public function) ``` @@ -214,22 +226,6 @@ approve(address spender, uint256 amount) → bool (public function) Approves amount transferFrom for spender. -``` -increaseAllowance(address spender, uint256 amount) → bool (external function) -``` - - - -Increases allowance by amount for spender. - -``` -decreaseAllowance(address spender, uint256 amount) → bool (external function) -``` - - - -Decreases allowance by amount for spender. - ``` transferFrom(address sender, address recipient, uint256 amount) → bool (public function) ``` diff --git a/docs/zevm/ZetaConnectorZEVM.md b/docs/zevm/ZetaConnectorZEVM.md new file mode 100644 index 00000000..d6bff788 --- /dev/null +++ b/docs/zevm/ZetaConnectorZEVM.md @@ -0,0 +1,140 @@ +## ZetaInterfaces + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/ZetaConnectorZEVM.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/ZetaConnectorZEVM.sol + +### Modifiers + +## WZETA + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/ZetaConnectorZEVM.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/ZetaConnectorZEVM.sol + +### Function List + +* [transferFrom(src, dst, wad)](#WZETA-transferFrom-address-address-uint256-) +* [withdraw(wad)](#WZETA-withdraw-uint256-) + +### Modifiers + +### Functions + +``` +transferFrom(address src, address dst, uint256 wad) → bool (external function) +``` + + + +``` +withdraw(uint256 wad) (external function) +``` + + + +## ZetaConnectorZEVM + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/ZetaConnectorZEVM.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/ZetaConnectorZEVM.sol + +### Function List + +* [constructor(wzeta_)](#ZetaConnectorZEVM-constructor-address-) +* [receive()](#ZetaConnectorZEVM-receive--) +* [send(input)](#ZetaConnectorZEVM-send-struct-ZetaInterfaces-SendInput-) +* [setWzetaAddress(wzeta_)](#ZetaConnectorZEVM-setWzetaAddress-address-) + +### Event List + +* [ZetaSent(sourceTxOriginAddress, zetaTxSenderAddress, destinationChainId, destinationAddress, zetaValueAndGas, destinationGasLimit, message, zetaParams)](#ZetaConnectorZEVM-ZetaSent-address-address-uint256-bytes-uint256-uint256-bytes-bytes-) +* [SetWZETA(wzeta_)](#ZetaConnectorZEVM-SetWZETA-address-) + +### Error List + +* [OnlyWZETA()](#ZetaConnectorZEVM-OnlyWZETA--) +* [WZETATransferFailed()](#ZetaConnectorZEVM-WZETATransferFailed--) +* [OnlyFungibleModule()](#ZetaConnectorZEVM-OnlyFungibleModule--) +* [FailedZetaSent()](#ZetaConnectorZEVM-FailedZetaSent--) + +### Modifiers + +### Functions + +``` +constructor(address wzeta_) (public function) +``` + + + +``` +receive() (external function) +``` + + + +Receive function to receive ZETA from WETH9.withdraw(). + +``` +send(struct ZetaInterfaces.SendInput input) (external function) +``` + + + +Sends ZETA and bytes messages (to execute it) crosschain. + +``` +setWzetaAddress(address wzeta_) (external function) +``` + + + +Sends ZETA and bytes messages (to execute it) crosschain. + +### Events + +``` +ZetaSent(address sourceTxOriginAddress, address indexed zetaTxSenderAddress, uint256 indexed destinationChainId, bytes destinationAddress, uint256 zetaValueAndGas, uint256 destinationGasLimit, bytes message, bytes zetaParams) (event) +``` + + + +``` +SetWZETA(address wzeta_) (event) +``` + + + +### Errors + +``` +OnlyWZETA() (error) +``` + + + +``` +WZETATransferFailed() (error) +``` + + + +``` +OnlyFungibleModule() (error) +``` + + + +``` +FailedZetaSent() (error) +``` + + + diff --git a/docs/zevm/interfaces/IWZETA.md b/docs/zevm/interfaces/IWZETA.md new file mode 100644 index 00000000..463924b0 --- /dev/null +++ b/docs/zevm/interfaces/IWZETA.md @@ -0,0 +1,104 @@ +## IWETH9 + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IWZETA.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/interfaces/IWZETA.sol + +### Function List + +* [totalSupply()](#IWETH9-totalSupply--) +* [balanceOf(owner)](#IWETH9-balanceOf-address-) +* [allowance(owner, spender)](#IWETH9-allowance-address-address-) +* [approve(spender, wad)](#IWETH9-approve-address-uint256-) +* [transfer(to, wad)](#IWETH9-transfer-address-uint256-) +* [transferFrom(from, to, wad)](#IWETH9-transferFrom-address-address-uint256-) +* [deposit()](#IWETH9-deposit--) +* [withdraw(wad)](#IWETH9-withdraw-uint256-) + +### Event List + +* [Approval(owner, spender, value)](#IWETH9-Approval-address-address-uint256-) +* [Transfer(from, to, value)](#IWETH9-Transfer-address-address-uint256-) +* [Deposit(dst, wad)](#IWETH9-Deposit-address-uint256-) +* [Withdrawal(src, wad)](#IWETH9-Withdrawal-address-uint256-) + +### Modifiers + +### Functions + +``` +totalSupply() → uint256 (external function) +``` + + + +``` +balanceOf(address owner) → uint256 (external function) +``` + + + +``` +allowance(address owner, address spender) → uint256 (external function) +``` + + + +``` +approve(address spender, uint256 wad) → bool (external function) +``` + + + +``` +transfer(address to, uint256 wad) → bool (external function) +``` + + + +``` +transferFrom(address from, address to, uint256 wad) → bool (external function) +``` + + + +``` +deposit() (external function) +``` + + + +``` +withdraw(uint256 wad) (external function) +``` + + + +### Events + +``` +Approval(address indexed owner, address indexed spender, uint256 value) (event) +``` + + + +``` +Transfer(address indexed from, address indexed to, uint256 value) (event) +``` + + + +``` +Deposit(address indexed dst, uint256 wad) (event) +``` + + + +``` +Withdrawal(address indexed src, uint256 wad) (event) +``` + + + diff --git a/docs/zevm/interfaces/zContract.md b/docs/zevm/interfaces/zContract.md index 679f9a2e..f47c2ca6 100644 --- a/docs/zevm/interfaces/zContract.md +++ b/docs/zevm/interfaces/zContract.md @@ -1,3 +1,12 @@ +## zContext + +```solidity +struct zContext { + bytes origin; + address sender; + uint256 chainID; +} +``` ## zContract ```solidity @@ -8,15 +17,15 @@ Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zev ### Function List -* [onCrossChainCall(zrc20, amount, message)](#zContract-onCrossChainCall-address-uint256-bytes-) +* [onCrossChainCall(context, zrc20, amount, message)](#zContract-onCrossChainCall-struct-zContext-address-uint256-bytes-) ### Modifiers ### Functions ``` -onCrossChainCall(address zrc20, uint256 amount, bytes message) (external function) +onCrossChainCall(struct zContext context, address zrc20, uint256 amount, bytes message) (external function) ``` - + diff --git a/docs/zevm/testing/SystemContractMock.md b/docs/zevm/testing/SystemContractMock.md new file mode 100644 index 00000000..23546a14 --- /dev/null +++ b/docs/zevm/testing/SystemContractMock.md @@ -0,0 +1,180 @@ +## SystemContractErrors + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/testing/SystemContractMock.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/testing/SystemContractMock.sol + +### Error List + +* [CallerIsNotFungibleModule()](#SystemContractErrors-CallerIsNotFungibleModule--) +* [InvalidTarget()](#SystemContractErrors-InvalidTarget--) +* [CantBeIdenticalAddresses()](#SystemContractErrors-CantBeIdenticalAddresses--) +* [CantBeZeroAddress()](#SystemContractErrors-CantBeZeroAddress--) + +### Modifiers + +### Errors + +``` +CallerIsNotFungibleModule() (error) +``` + + + +``` +InvalidTarget() (error) +``` + + + +``` +CantBeIdenticalAddresses() (error) +``` + + + +``` +CantBeZeroAddress() (error) +``` + + + +## SystemContractMock + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/testing/SystemContractMock.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/testing/SystemContractMock.sol + +### Function List + +* [constructor(wzeta_, uniswapv2Factory_, uniswapv2Router02_)](#SystemContractMock-constructor-address-address-address-) +* [setGasPrice(chainID, price)](#SystemContractMock-setGasPrice-uint256-uint256-) +* [setGasCoinZRC20(chainID, zrc20)](#SystemContractMock-setGasCoinZRC20-uint256-address-) +* [setWZETAContractAddress(addr)](#SystemContractMock-setWZETAContractAddress-address-) +* [sortTokens(tokenA, tokenB)](#SystemContractMock-sortTokens-address-address-) +* [uniswapv2PairFor(factory, tokenA, tokenB)](#SystemContractMock-uniswapv2PairFor-address-address-address-) +* [onCrossChainCall(target, zrc20, amount, message)](#SystemContractMock-onCrossChainCall-address-address-uint256-bytes-) + +### Event List + +* [SystemContractDeployed()](#SystemContractMock-SystemContractDeployed--) +* [SetGasPrice(, )](#SystemContractMock-SetGasPrice-uint256-uint256-) +* [SetGasCoin(, )](#SystemContractMock-SetGasCoin-uint256-address-) +* [SetGasZetaPool(, )](#SystemContractMock-SetGasZetaPool-uint256-address-) +* [SetWZeta()](#SystemContractMock-SetWZeta-address-) + +### Error List + +* [CallerIsNotFungibleModule()](#SystemContractErrors-CallerIsNotFungibleModule--) +* [InvalidTarget()](#SystemContractErrors-InvalidTarget--) +* [CantBeIdenticalAddresses()](#SystemContractErrors-CantBeIdenticalAddresses--) +* [CantBeZeroAddress()](#SystemContractErrors-CantBeZeroAddress--) + +### Modifiers + +### Functions + +``` +constructor(address wzeta_, address uniswapv2Factory_, address uniswapv2Router02_) (public function) +``` + + + +``` +setGasPrice(uint256 chainID, uint256 price) (external function) +``` + + + +``` +setGasCoinZRC20(uint256 chainID, address zrc20) (external function) +``` + + + +``` +setWZETAContractAddress(address addr) (external function) +``` + + + +``` +sortTokens(address tokenA, address tokenB) → address token0, address token1 (internal function) +``` + + + +``` +uniswapv2PairFor(address factory, address tokenA, address tokenB) → address pair (public function) +``` + + + +``` +onCrossChainCall(address target, address zrc20, uint256 amount, bytes message) (external function) +``` + + + +### Events + +``` +SystemContractDeployed() (event) +``` + + + +``` +SetGasPrice(uint256, uint256) (event) +``` + + + +``` +SetGasCoin(uint256, address) (event) +``` + + + +``` +SetGasZetaPool(uint256, address) (event) +``` + + + +``` +SetWZeta(address) (event) +``` + + + +### Errors + +``` +CallerIsNotFungibleModule() (error) +``` + + + +``` +InvalidTarget() (error) +``` + + + +``` +CantBeIdenticalAddresses() (error) +``` + + + +``` +CantBeZeroAddress() (error) +``` + + + diff --git a/docs/zevm/wzeta.md b/docs/zevm/wzeta.md index c9ccde4d..70130944 100644 --- a/docs/zevm/wzeta.md +++ b/docs/zevm/wzeta.md @@ -1,10 +1,10 @@ ## WETH9 ```solidity -import "@zetachain/protocol-contracts/contracts/zevm/wzeta.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/WZETA.sol"; ``` -Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/wzeta.sol +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/WZETA.sol ### Function List diff --git a/hardhat.config.ts b/hardhat.config.ts index 40285136..42209f8c 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -12,6 +12,10 @@ import * as dotenv from "dotenv"; dotenv.config(); const config: HardhatUserConfig = { + docgen: { + pages: "files", + templates: "templates", + }, //@ts-ignore etherscan: { apiKey: { diff --git a/typechain-types/contracts/zevm/ConnectorZEVM.sol/index.ts b/typechain-types/contracts/zevm/ConnectorZEVM.sol/index.ts new file mode 100644 index 00000000..d3a48671 --- /dev/null +++ b/typechain-types/contracts/zevm/ConnectorZEVM.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { WZETA } from "./WZETA"; +export type { ZetaConnectorZEVM } from "./ZetaConnectorZEVM"; diff --git a/typechain-types/contracts/zevm/index.ts b/typechain-types/contracts/zevm/index.ts index c1e5459a..2fdd00a1 100644 --- a/typechain-types/contracts/zevm/index.ts +++ b/typechain-types/contracts/zevm/index.ts @@ -1,6 +1,8 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +import type * as connectorZevmSol from "./ConnectorZEVM.sol"; +export type { connectorZevmSol }; import type * as interfacesSol from "./Interfaces.sol"; export type { interfacesSol }; import type * as systemContractSol from "./SystemContract.sol"; diff --git a/typechain-types/factories/contracts/zevm/ConnectorZEVM.sol/index.ts b/typechain-types/factories/contracts/zevm/ConnectorZEVM.sol/index.ts new file mode 100644 index 00000000..332c40b4 --- /dev/null +++ b/typechain-types/factories/contracts/zevm/ConnectorZEVM.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { WZETA__factory } from "./WZETA__factory"; +export { ZetaConnectorZEVM__factory } from "./ZetaConnectorZEVM__factory"; diff --git a/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts b/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts index d517d8a9..99f6db56 100644 --- a/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts +++ b/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts @@ -626,7 +626,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea2646970667358221220edaf9ed98354e71aa84b95b4433f47537dd491d72f649020c367c23ec482327064736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea26469706673582212206bd16bdd52b8c9f0ef32b9f779b356cfd2e5dd82e89d711765d3d0f38a2f163964736f6c63430008070033"; type ZRC20ConstructorParams = | [signer?: Signer] diff --git a/typechain-types/factories/contracts/zevm/index.ts b/typechain-types/factories/contracts/zevm/index.ts index 1d36cb0b..287b7600 100644 --- a/typechain-types/factories/contracts/zevm/index.ts +++ b/typechain-types/factories/contracts/zevm/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export * as connectorZevmSol from "./ConnectorZEVM.sol"; export * as interfacesSol from "./Interfaces.sol"; export * as systemContractSol from "./SystemContract.sol"; export * as wzetaSol from "./WZETA.sol"; diff --git a/typechain-types/hardhat.d.ts b/typechain-types/hardhat.d.ts index d0d85364..2727e8f8 100644 --- a/typechain-types/hardhat.d.ts +++ b/typechain-types/hardhat.d.ts @@ -292,6 +292,14 @@ declare module "hardhat/types/runtime" { name: "ZetaConnectorNonEth", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "WZETA", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaConnectorZEVM", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ISystem", signerOrOptions?: ethers.Signer | FactoryOptions @@ -711,6 +719,16 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "WZETA", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaConnectorZEVM", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ISystem", address: string, diff --git a/typechain-types/index.ts b/typechain-types/index.ts index 688a7938..b06985f6 100644 --- a/typechain-types/index.ts +++ b/typechain-types/index.ts @@ -136,6 +136,10 @@ export type { ZetaConnectorEth } from "./contracts/evm/ZetaConnector.eth.sol/Zet export { ZetaConnectorEth__factory } from "./factories/contracts/evm/ZetaConnector.eth.sol/ZetaConnectorEth__factory"; export type { ZetaConnectorNonEth } from "./contracts/evm/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; export { ZetaConnectorNonEth__factory } from "./factories/contracts/evm/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory"; +export type { WZETA } from "./contracts/zevm/ConnectorZEVM.sol/WZETA"; +export { WZETA__factory } from "./factories/contracts/zevm/ConnectorZEVM.sol/WZETA__factory"; +export type { ZetaConnectorZEVM } from "./contracts/zevm/ConnectorZEVM.sol/ZetaConnectorZEVM"; +export { ZetaConnectorZEVM__factory } from "./factories/contracts/zevm/ConnectorZEVM.sol/ZetaConnectorZEVM__factory"; export type { ISystem } from "./contracts/zevm/Interfaces.sol/ISystem"; export { ISystem__factory } from "./factories/contracts/zevm/Interfaces.sol/ISystem__factory"; export type { IZRC20 } from "./contracts/zevm/Interfaces.sol/IZRC20"; @@ -152,10 +156,6 @@ export type { SystemContractErrors } from "./contracts/zevm/SystemContract.sol/S export { SystemContractErrors__factory } from "./factories/contracts/zevm/SystemContract.sol/SystemContractErrors__factory"; export type { SystemContractMock } from "./contracts/zevm/testing/SystemContractMock.sol/SystemContractMock"; export { SystemContractMock__factory } from "./factories/contracts/zevm/testing/SystemContractMock.sol/SystemContractMock__factory"; -export type { WZETA } from "./contracts/zevm/ZetaConnectorZEVM.sol/WZETA"; -export { WZETA__factory } from "./factories/contracts/zevm/ZetaConnectorZEVM.sol/WZETA__factory"; -export type { ZetaConnectorZEVM } from "./contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM"; -export { ZetaConnectorZEVM__factory } from "./factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory"; export type { ZRC20 } from "./contracts/zevm/ZRC20.sol/ZRC20"; export { ZRC20__factory } from "./factories/contracts/zevm/ZRC20.sol/ZRC20__factory"; export type { ZRC20Errors } from "./contracts/zevm/ZRC20.sol/ZRC20Errors"; diff --git a/yarn.lock b/yarn.lock index 0d1edcad..bb7433c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7979,6 +7979,14 @@ solidity-coverage@^0.8.2: shelljs "^0.8.3" web3-utils "^1.3.6" +solidity-docgen@^0.6.0-beta.35: + version "0.6.0-beta.36" + resolved "https://registry.yarnpkg.com/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz#9c76eda58580fb52e2db318c22fe3154e0c09dd1" + integrity sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ== + dependencies: + handlebars "^4.7.7" + solidity-ast "^0.4.38" + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"