From a02540c2b1e3dcb5a4c7939f41bcfb0013146e60 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Mon, 11 Mar 2024 13:08:59 +0500 Subject: [PATCH 1/3] Generate contract docs --- .../evm/tools/ImmutableCreate2Factory.sol | 6 +- docs/evm/ERC20Custody.md | 254 ++++++++ docs/evm/Zeta.non-eth.md | 162 +++++ docs/evm/ZetaConnector.base.md | 246 ++++++++ docs/evm/ZetaConnector.eth.md | 178 ++++++ docs/evm/ZetaConnector.non-eth.md | 195 ++++++ docs/evm/interfaces/ConnectorErrors.md | 59 ++ docs/evm/interfaces/ZetaErrors.md | 59 ++ docs/evm/interfaces/ZetaInteractorErrors.md | 45 ++ docs/evm/interfaces/ZetaInterfaces.md | 180 ++++++ docs/evm/interfaces/ZetaNonEthInterface.md | 58 ++ docs/evm/testing/AttackerContract.md | 100 ++++ docs/evm/testing/ERC20Mock.md | 51 ++ docs/evm/testing/ZetaInteractorMock.md | 94 +++ docs/evm/tools/ImmutableCreate2Factory.md | 121 ++++ docs/evm/tools/ZetaInteractor.md | 108 ++++ .../ZetaTokenConsumerPancakeV3.strategy.md | 222 +++++++ docs/zevm/Interfaces.md | 290 +++++++++ docs/zevm/Uniswap.md | 10 + docs/zevm/UniswapPeriphery.md | 10 + docs/zevm/WZETA.md | 97 +++ docs/zevm/ZRC20.md | 411 +++++++++++++ docs/zevm/ZetaConnectorZEVM.md | 140 +++++ docs/zevm/interfaces/IWZETA.md | 104 ++++ docs/zevm/interfaces/IZRC20.md | 160 +++++ docs/zevm/interfaces/zContract.md | 31 + docs/zevm/testing/SystemContractMock.md | 180 ++++++ hardhat.config.ts | 5 + package.json | 7 +- templates/contract.hbs | 118 ++++ templates/helpers.js | 12 + templates/page.hbs | 5 + templates/properties.js | 40 ++ .../ImmutableCreate2Factory__factory.ts | 2 +- yarn.lock | 560 +++++++++++++++++- 35 files changed, 4303 insertions(+), 17 deletions(-) create mode 100644 docs/evm/ERC20Custody.md create mode 100644 docs/evm/Zeta.non-eth.md create mode 100644 docs/evm/ZetaConnector.base.md create mode 100644 docs/evm/ZetaConnector.eth.md create mode 100644 docs/evm/ZetaConnector.non-eth.md create mode 100644 docs/evm/interfaces/ConnectorErrors.md create mode 100644 docs/evm/interfaces/ZetaErrors.md create mode 100644 docs/evm/interfaces/ZetaInteractorErrors.md create mode 100644 docs/evm/interfaces/ZetaInterfaces.md create mode 100644 docs/evm/interfaces/ZetaNonEthInterface.md create mode 100644 docs/evm/testing/AttackerContract.md create mode 100644 docs/evm/testing/ERC20Mock.md create mode 100644 docs/evm/testing/ZetaInteractorMock.md create mode 100644 docs/evm/tools/ImmutableCreate2Factory.md create mode 100644 docs/evm/tools/ZetaInteractor.md create mode 100644 docs/evm/tools/ZetaTokenConsumerPancakeV3.strategy.md create mode 100644 docs/zevm/Interfaces.md create mode 100644 docs/zevm/Uniswap.md create mode 100644 docs/zevm/UniswapPeriphery.md create mode 100644 docs/zevm/WZETA.md create mode 100644 docs/zevm/ZRC20.md create mode 100644 docs/zevm/ZetaConnectorZEVM.md create mode 100644 docs/zevm/interfaces/IWZETA.md create mode 100644 docs/zevm/interfaces/IZRC20.md create mode 100644 docs/zevm/interfaces/zContract.md create mode 100644 docs/zevm/testing/SystemContractMock.md create mode 100644 templates/contract.hbs create mode 100644 templates/helpers.js create mode 100644 templates/page.hbs create mode 100644 templates/properties.js diff --git a/contracts/evm/tools/ImmutableCreate2Factory.sol b/contracts/evm/tools/ImmutableCreate2Factory.sol index c96253a4..3eb71b4f 100644 --- a/contracts/evm/tools/ImmutableCreate2Factory.sol +++ b/contracts/evm/tools/ImmutableCreate2Factory.sol @@ -81,7 +81,7 @@ contract ImmutableCreate2Factory { * @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 + * @return deploymentAddress Address of the contract that will be created, or the null address * if a contract already exists at that address. */ function safeCreate2( @@ -102,7 +102,7 @@ contract ImmutableCreate2Factory { * @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 + * @return deploymentAddress Address of the contract that will be created, or the null address * if a contract has already been deployed to that address. */ function findCreate2Address( @@ -142,7 +142,7 @@ contract ImmutableCreate2Factory { * @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 + * @return deploymentAddress Address of the contract that will be created, or the null address * if a contract has already been deployed to that address. */ function findCreate2AddressViaHash( diff --git a/docs/evm/ERC20Custody.md b/docs/evm/ERC20Custody.md new file mode 100644 index 00000000..1dcd62d9 --- /dev/null +++ b/docs/evm/ERC20Custody.md @@ -0,0 +1,254 @@ +## ERC20Custody + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/ERC20Custody.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/ERC20Custody.sol + +### Modifier List + +* [onlyTSS()](#ERC20Custody-onlyTSS--) +* [onlyTSSUpdater()](#ERC20Custody-onlyTSSUpdater--) + +### Function List + +* [constructor(TSSAddress_, TSSAddressUpdater_, zetaFee_, zetaMaxFee_, zeta_)](#ERC20Custody-constructor-address-address-uint256-uint256-contract-IERC20-) +* [updateTSSAddress(TSSAddress_)](#ERC20Custody-updateTSSAddress-address-) +* [updateZetaFee(zetaFee_)](#ERC20Custody-updateZetaFee-uint256-) +* [renounceTSSAddressUpdater()](#ERC20Custody-renounceTSSAddressUpdater--) +* [pause()](#ERC20Custody-pause--) +* [unpause()](#ERC20Custody-unpause--) +* [whitelist(asset)](#ERC20Custody-whitelist-contract-IERC20-) +* [unwhitelist(asset)](#ERC20Custody-unwhitelist-contract-IERC20-) +* [deposit(recipient, asset, amount, message)](#ERC20Custody-deposit-bytes-contract-IERC20-uint256-bytes-) +* [withdraw(recipient, asset, amount)](#ERC20Custody-withdraw-address-contract-IERC20-uint256-) + +### Event List + +* [Paused(sender)](#ERC20Custody-Paused-address-) +* [Unpaused(sender)](#ERC20Custody-Unpaused-address-) +* [Whitelisted(asset)](#ERC20Custody-Whitelisted-contract-IERC20-) +* [Unwhitelisted(asset)](#ERC20Custody-Unwhitelisted-contract-IERC20-) +* [Deposited(recipient, asset, amount, message)](#ERC20Custody-Deposited-bytes-contract-IERC20-uint256-bytes-) +* [Withdrawn(recipient, asset, amount)](#ERC20Custody-Withdrawn-address-contract-IERC20-uint256-) +* [RenouncedTSSUpdater(TSSAddressUpdater_)](#ERC20Custody-RenouncedTSSUpdater-address-) +* [UpdatedTSSAddress(TSSAddress_)](#ERC20Custody-UpdatedTSSAddress-address-) +* [UpdatedZetaFee(zetaFee_)](#ERC20Custody-UpdatedZetaFee-uint256-) + +### Error List + +* [NotWhitelisted()](#ERC20Custody-NotWhitelisted--) +* [NotPaused()](#ERC20Custody-NotPaused--) +* [InvalidSender()](#ERC20Custody-InvalidSender--) +* [InvalidTSSUpdater()](#ERC20Custody-InvalidTSSUpdater--) +* [ZeroAddress()](#ERC20Custody-ZeroAddress--) +* [IsPaused()](#ERC20Custody-IsPaused--) +* [ZetaMaxFeeExceeded()](#ERC20Custody-ZetaMaxFeeExceeded--) +* [ZeroFee()](#ERC20Custody-ZeroFee--) + +### Modifiers + +``` +onlyTSS() (modifier) +``` + + + +Only TSS address allowed modifier. + +``` +onlyTSSUpdater() (modifier) +``` + + + +Only TSS address updater allowed modifier. + +### Functions + +``` +constructor(address TSSAddress_, address TSSAddressUpdater_, uint256 zetaFee_, uint256 zetaMaxFee_, contract IERC20 zeta_) (public function) +``` + + + +``` +updateTSSAddress(address TSSAddress_) (external function) +``` + + + +Update the TSSAddress in case of Zeta blockchain validator nodes churn. + +``` +updateZetaFee(uint256 zetaFee_) (external function) +``` + + + +Update zeta fee + +``` +renounceTSSAddressUpdater() (external function) +``` + + + +Change the ownership of TSSAddressUpdater to the Zeta blockchain TSS nodes. +Effectively, only Zeta blockchain validators collectively can update TSSAddress afterwards. + +``` +pause() (external function) +``` + + + +Pause custody operations. + +``` +unpause() (external function) +``` + + + +Unpause custody operations. + +``` +whitelist(contract IERC20 asset) (external function) +``` + + + +Whitelist asset. + +``` +unwhitelist(contract IERC20 asset) (external function) +``` + + + +Unwhitelist asset. + +``` +deposit(bytes recipient, contract IERC20 asset, uint256 amount, bytes message) (external function) +``` + + + +Deposit asset amount to recipient with message that encodes additional zetachain evm call or message. + +``` +withdraw(address recipient, contract IERC20 asset, uint256 amount) (external function) +``` + + + +Withdraw asset amount to recipient by custody TSS owner. + +### Events + +``` +Paused(address sender) (event) +``` + + + +``` +Unpaused(address sender) (event) +``` + + + +``` +Whitelisted(contract IERC20 indexed asset) (event) +``` + + + +``` +Unwhitelisted(contract IERC20 indexed asset) (event) +``` + + + +``` +Deposited(bytes recipient, contract IERC20 indexed asset, uint256 amount, bytes message) (event) +``` + + + +``` +Withdrawn(address indexed recipient, contract IERC20 indexed asset, uint256 amount) (event) +``` + + + +``` +RenouncedTSSUpdater(address TSSAddressUpdater_) (event) +``` + + + +``` +UpdatedTSSAddress(address TSSAddress_) (event) +``` + + + +``` +UpdatedZetaFee(uint256 zetaFee_) (event) +``` + + + +### Errors + +``` +NotWhitelisted() (error) +``` + + + +``` +NotPaused() (error) +``` + + + +``` +InvalidSender() (error) +``` + + + +``` +InvalidTSSUpdater() (error) +``` + + + +``` +ZeroAddress() (error) +``` + + + +``` +IsPaused() (error) +``` + + + +``` +ZetaMaxFeeExceeded() (error) +``` + + + +``` +ZeroFee() (error) +``` + + + diff --git a/docs/evm/Zeta.non-eth.md b/docs/evm/Zeta.non-eth.md new file mode 100644 index 00000000..d5d54080 --- /dev/null +++ b/docs/evm/Zeta.non-eth.md @@ -0,0 +1,162 @@ +## ZetaNonEth + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/Zeta.non-eth.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/Zeta.non-eth.sol + +### Function List + +* [constructor(tssAddress_, tssAddressUpdater_)](#ZetaNonEth-constructor-address-address-) +* [updateTssAndConnectorAddresses(tssAddress_, connectorAddress_)](#ZetaNonEth-updateTssAndConnectorAddresses-address-address-) +* [renounceTssAddressUpdater()](#ZetaNonEth-renounceTssAddressUpdater--) +* [mint(mintee, value, internalSendHash)](#ZetaNonEth-mint-address-uint256-bytes32-) +* [burnFrom(account, amount)](#ZetaNonEth-burnFrom-address-uint256-) + +### Event List + +* [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-) + +### Error List + +* [CallerIsNotTss(caller)](#ZetaErrors-CallerIsNotTss-address-) +* [CallerIsNotConnector(caller)](#ZetaErrors-CallerIsNotConnector-address-) +* [CallerIsNotTssUpdater(caller)](#ZetaErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ZetaErrors-CallerIsNotTssOrUpdater-address-) +* [InvalidAddress()](#ZetaErrors-InvalidAddress--) +* [ZetaTransferError()](#ZetaErrors-ZetaTransferError--) + +### Modifiers + +### Functions + +``` +constructor(address tssAddress_, address tssAddressUpdater_) (public function) +``` + + + +``` +updateTssAndConnectorAddresses(address tssAddress_, address connectorAddress_) (external function) +``` + + + +``` +renounceTssAddressUpdater() (external function) +``` + + + +Sets tssAddressUpdater to be tssAddress + +``` +mint(address mintee, uint256 value, bytes32 internalSendHash) (external function) +``` + + + +``` +burnFrom(address account, uint256 amount) (public function) +``` + + + +### Events + +``` +Minted(address indexed mintee, uint256 amount, bytes32 indexed internalSendHash) (event) +``` + + + +``` +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) +``` + + + +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. + +### Errors + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotConnector(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +InvalidAddress() (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + diff --git a/docs/evm/ZetaConnector.base.md b/docs/evm/ZetaConnector.base.md new file mode 100644 index 00000000..c2725de2 --- /dev/null +++ b/docs/evm/ZetaConnector.base.md @@ -0,0 +1,246 @@ +## ZetaConnectorBase + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/ZetaConnector.base.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/ZetaConnector.base.sol + +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. + +### Modifier List + +* [onlyPauser()](#ZetaConnectorBase-onlyPauser--) +* [onlyTssAddress()](#ZetaConnectorBase-onlyTssAddress--) +* [onlyTssUpdater()](#ZetaConnectorBase-onlyTssUpdater--) + +### Function List + +* [constructor(zetaToken_, tssAddress_, tssAddressUpdater_, pauserAddress_)](#ZetaConnectorBase-constructor-address-address-address-address-) +* [updatePauserAddress(pauserAddress_)](#ZetaConnectorBase-updatePauserAddress-address-) +* [updateTssAddress(tssAddress_)](#ZetaConnectorBase-updateTssAddress-address-) +* [renounceTssAddressUpdater()](#ZetaConnectorBase-renounceTssAddressUpdater--) +* [pause()](#ZetaConnectorBase-pause--) +* [unpause()](#ZetaConnectorBase-unpause--) +* [send(input)](#ZetaConnectorBase-send-struct-ZetaInterfaces-SendInput-) +* [onReceive(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorBase-onReceive-bytes-uint256-address-uint256-bytes-bytes32-) +* [onRevert(zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash)](#ZetaConnectorBase-onRevert-address-uint256-bytes-uint256-uint256-bytes-bytes32-) + +### Event List + +* [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(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-) + +### Error List + +* [CallerIsNotPauser(caller)](#ConnectorErrors-CallerIsNotPauser-address-) +* [CallerIsNotTss(caller)](#ConnectorErrors-CallerIsNotTss-address-) +* [CallerIsNotTssUpdater(caller)](#ConnectorErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ConnectorErrors-CallerIsNotTssOrUpdater-address-) +* [ZetaTransferError()](#ConnectorErrors-ZetaTransferError--) +* [ExceedsMaxSupply(maxSupply)](#ConnectorErrors-ExceedsMaxSupply-uint256-) + +### Modifiers + +``` +onlyPauser() (modifier) +``` + + + +Modifier to restrict actions to pauser address. + +``` +onlyTssAddress() (modifier) +``` + + + +Modifier to restrict actions to TSS address. + +``` +onlyTssUpdater() (modifier) +``` + + + +Modifier to restrict actions to TSS updater address. + +### Functions + +``` +constructor(address zetaToken_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) (public function) +``` + + + +Constructor requires initial addresses. +zetaToken address is the only immutable one, while others can be updated. + +``` +updatePauserAddress(address pauserAddress_) (external function) +``` + + + +Update the pauser address. The only address allowed to do that is the current pauser. + +``` +updateTssAddress(address tssAddress_) (external function) +``` + + + +Update the TSS address. The address can be updated by the TSS updater or the TSS address itself. + +``` +renounceTssAddressUpdater() (external function) +``` + + + +Changes the ownership of tssAddressUpdater to be the one held by the ZetaChain TSS Signer nodes. + +``` +pause() (external function) +``` + + + +Pause the input (send) transactions. + +``` +unpause() (external function) +``` + + + +Unpause the contract to allow transactions again. + +``` +send(struct ZetaInterfaces.SendInput input) (external function) +``` + + + +Entrypoint to send data and value through ZetaChain. + +``` +onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +Handler to receive data from other chain. +This method can be called only by TSS. Access validation is in implementation. + +``` +onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +Handler to receive errors from other chain. +This method can be called only by TSS. Access validation is in implementation. + +### Events + +``` +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 callerAddress, address newTssAddress) (event) +``` + + + +``` +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) +``` + + + +``` +Paused(address account) (event) +``` + + + +Emitted when the pause is triggered by `account`. + +``` +Unpaused(address account) (event) +``` + + + +Emitted when the pause is lifted by `account`. + +### Errors + +``` +CallerIsNotPauser(address caller) (error) +``` + + + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + +``` +ExceedsMaxSupply(uint256 maxSupply) (error) +``` + + + diff --git a/docs/evm/ZetaConnector.eth.md b/docs/evm/ZetaConnector.eth.md new file mode 100644 index 00000000..ea4112fd --- /dev/null +++ b/docs/evm/ZetaConnector.eth.md @@ -0,0 +1,178 @@ +## ZetaConnectorEth + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/ZetaConnector.eth.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/ZetaConnector.eth.sol + +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. + +### Function List + +* [constructor(zetaToken_, tssAddress_, tssAddressUpdater_, pauserAddress_)](#ZetaConnectorEth-constructor-address-address-address-address-) +* [getLockedAmount()](#ZetaConnectorEth-getLockedAmount--) +* [send(input)](#ZetaConnectorEth-send-struct-ZetaInterfaces-SendInput-) +* [onReceive(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorEth-onReceive-bytes-uint256-address-uint256-bytes-bytes32-) +* [onRevert(zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash)](#ZetaConnectorEth-onRevert-address-uint256-bytes-uint256-uint256-bytes-bytes32-) + +### Event List + +* [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(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-) + +### Error List + +* [CallerIsNotPauser(caller)](#ConnectorErrors-CallerIsNotPauser-address-) +* [CallerIsNotTss(caller)](#ConnectorErrors-CallerIsNotTss-address-) +* [CallerIsNotTssUpdater(caller)](#ConnectorErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ConnectorErrors-CallerIsNotTssOrUpdater-address-) +* [ZetaTransferError()](#ConnectorErrors-ZetaTransferError--) +* [ExceedsMaxSupply(maxSupply)](#ConnectorErrors-ExceedsMaxSupply-uint256-) + +### Modifiers + +### Functions + +``` +constructor(address zetaToken_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) (public function) +``` + + + +``` +getLockedAmount() → uint256 (external function) +``` + + + +``` +send(struct ZetaInterfaces.SendInput input) (external function) +``` + + + +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. + +``` +onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +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. + +``` +onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +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. + +### Events + +``` +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 callerAddress, address newTssAddress) (event) +``` + + + +``` +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) +``` + + + +``` +Paused(address account) (event) +``` + + + +Emitted when the pause is triggered by `account`. + +``` +Unpaused(address account) (event) +``` + + + +Emitted when the pause is lifted by `account`. + +### Errors + +``` +CallerIsNotPauser(address caller) (error) +``` + + + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + +``` +ExceedsMaxSupply(uint256 maxSupply) (error) +``` + + + diff --git a/docs/evm/ZetaConnector.non-eth.md b/docs/evm/ZetaConnector.non-eth.md new file mode 100644 index 00000000..c0e389ef --- /dev/null +++ b/docs/evm/ZetaConnector.non-eth.md @@ -0,0 +1,195 @@ +## ZetaConnectorNonEth + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/ZetaConnector.non-eth.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/ZetaConnector.non-eth.sol + +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 + +### Function List + +* [constructor(zetaTokenAddress_, tssAddress_, tssAddressUpdater_, pauserAddress_)](#ZetaConnectorNonEth-constructor-address-address-address-address-) +* [getLockedAmount()](#ZetaConnectorNonEth-getLockedAmount--) +* [setMaxSupply(maxSupply_)](#ZetaConnectorNonEth-setMaxSupply-uint256-) +* [send(input)](#ZetaConnectorNonEth-send-struct-ZetaInterfaces-SendInput-) +* [onReceive(zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash)](#ZetaConnectorNonEth-onReceive-bytes-uint256-address-uint256-bytes-bytes32-) +* [onRevert(zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash)](#ZetaConnectorNonEth-onRevert-address-uint256-bytes-uint256-uint256-bytes-bytes32-) + +### 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(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-) + +### Error List + +* [CallerIsNotPauser(caller)](#ConnectorErrors-CallerIsNotPauser-address-) +* [CallerIsNotTss(caller)](#ConnectorErrors-CallerIsNotTss-address-) +* [CallerIsNotTssUpdater(caller)](#ConnectorErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ConnectorErrors-CallerIsNotTssOrUpdater-address-) +* [ZetaTransferError()](#ConnectorErrors-ZetaTransferError--) +* [ExceedsMaxSupply(maxSupply)](#ConnectorErrors-ExceedsMaxSupply-uint256-) + +### Modifiers + +### Functions + +``` +constructor(address zetaTokenAddress_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_) (public function) +``` + + + +``` +getLockedAmount() → uint256 (external function) +``` + + + +``` +setMaxSupply(uint256 maxSupply_) (external function) +``` + + + +``` +send(struct ZetaInterfaces.SendInput input) (external function) +``` + + + +Entry point to send data to protocol +This call burn the token and emit an event with all the data needed by the protocol + +``` +onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +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. + +``` +onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) (external function) +``` + + + +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. + +### 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) +``` + + + +``` +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 callerAddress, address newTssAddress) (event) +``` + + + +``` +TSSAddressUpdaterUpdated(address callerAddress, address newTssUpdaterAddress) (event) +``` + + + +``` +PauserAddressUpdated(address callerAddress, address newTssAddress) (event) +``` + + + +``` +Paused(address account) (event) +``` + + + +Emitted when the pause is triggered by `account`. + +``` +Unpaused(address account) (event) +``` + + + +Emitted when the pause is lifted by `account`. + +### Errors + +``` +CallerIsNotPauser(address caller) (error) +``` + + + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + +``` +ExceedsMaxSupply(uint256 maxSupply) (error) +``` + + + diff --git a/docs/evm/interfaces/ConnectorErrors.md b/docs/evm/interfaces/ConnectorErrors.md new file mode 100644 index 00000000..20a8c01a --- /dev/null +++ b/docs/evm/interfaces/ConnectorErrors.md @@ -0,0 +1,59 @@ +## ConnectorErrors + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ConnectorErrors.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ConnectorErrors.sol + +Interface with connector custom errors + +### Error List + +* [CallerIsNotPauser(caller)](#ConnectorErrors-CallerIsNotPauser-address-) +* [CallerIsNotTss(caller)](#ConnectorErrors-CallerIsNotTss-address-) +* [CallerIsNotTssUpdater(caller)](#ConnectorErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ConnectorErrors-CallerIsNotTssOrUpdater-address-) +* [ZetaTransferError()](#ConnectorErrors-ZetaTransferError--) +* [ExceedsMaxSupply(maxSupply)](#ConnectorErrors-ExceedsMaxSupply-uint256-) + +### Modifiers + +### Errors + +``` +CallerIsNotPauser(address caller) (error) +``` + + + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + +``` +ExceedsMaxSupply(uint256 maxSupply) (error) +``` + + + diff --git a/docs/evm/interfaces/ZetaErrors.md b/docs/evm/interfaces/ZetaErrors.md new file mode 100644 index 00000000..1cbc72b2 --- /dev/null +++ b/docs/evm/interfaces/ZetaErrors.md @@ -0,0 +1,59 @@ +## ZetaErrors + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaErrors.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaErrors.sol + +Common custom errors + +### Error List + +* [CallerIsNotTss(caller)](#ZetaErrors-CallerIsNotTss-address-) +* [CallerIsNotConnector(caller)](#ZetaErrors-CallerIsNotConnector-address-) +* [CallerIsNotTssUpdater(caller)](#ZetaErrors-CallerIsNotTssUpdater-address-) +* [CallerIsNotTssOrUpdater(caller)](#ZetaErrors-CallerIsNotTssOrUpdater-address-) +* [InvalidAddress()](#ZetaErrors-InvalidAddress--) +* [ZetaTransferError()](#ZetaErrors-ZetaTransferError--) + +### Modifiers + +### Errors + +``` +CallerIsNotTss(address caller) (error) +``` + + + +``` +CallerIsNotConnector(address caller) (error) +``` + + + +``` +CallerIsNotTssUpdater(address caller) (error) +``` + + + +``` +CallerIsNotTssOrUpdater(address caller) (error) +``` + + + +``` +InvalidAddress() (error) +``` + + + +``` +ZetaTransferError() (error) +``` + + + diff --git a/docs/evm/interfaces/ZetaInteractorErrors.md b/docs/evm/interfaces/ZetaInteractorErrors.md new file mode 100644 index 00000000..d082c829 --- /dev/null +++ b/docs/evm/interfaces/ZetaInteractorErrors.md @@ -0,0 +1,45 @@ +## ZetaInteractorErrors + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInteractorErrors.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInteractorErrors.sol + +Interface with Zeta Interactor errors + +### Error List + +* [InvalidDestinationChainId()](#ZetaInteractorErrors-InvalidDestinationChainId--) +* [InvalidCaller(caller)](#ZetaInteractorErrors-InvalidCaller-address-) +* [InvalidZetaMessageCall()](#ZetaInteractorErrors-InvalidZetaMessageCall--) +* [InvalidZetaRevertCall()](#ZetaInteractorErrors-InvalidZetaRevertCall--) + +### Modifiers + +### Errors + +``` +InvalidDestinationChainId() (error) +``` + + + +``` +InvalidCaller(address caller) (error) +``` + + + +``` +InvalidZetaMessageCall() (error) +``` + + + +``` +InvalidZetaRevertCall() (error) +``` + + + diff --git a/docs/evm/interfaces/ZetaInterfaces.md b/docs/evm/interfaces/ZetaInterfaces.md new file mode 100644 index 00000000..35df976b --- /dev/null +++ b/docs/evm/interfaces/ZetaInterfaces.md @@ -0,0 +1,180 @@ +## ZetaInterfaces + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInterfaces.sol + +### Modifiers + +## ZetaConnector + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInterfaces.sol + +### Function List + +* [send(input)](#ZetaConnector-send-struct-ZetaInterfaces-SendInput-) + +### Modifiers + +### Functions + +``` +send(struct ZetaInterfaces.SendInput input) (external function) +``` + + + +Sending value and data cross-chain is as easy as calling connector.send(SendInput) + +## ZetaReceiver + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInterfaces.sol + +### Function List + +* [onZetaMessage(zetaMessage)](#ZetaReceiver-onZetaMessage-struct-ZetaInterfaces-ZetaMessage-) +* [onZetaRevert(zetaRevert)](#ZetaReceiver-onZetaRevert-struct-ZetaInterfaces-ZetaRevert-) + +### Modifiers + +### Functions + +``` +onZetaMessage(struct ZetaInterfaces.ZetaMessage zetaMessage) (external function) +``` + + + +onZetaMessage is called when a cross-chain message reaches a contract + +``` +onZetaRevert(struct ZetaInterfaces.ZetaRevert zetaRevert) (external function) +``` + + + +onZetaRevert is called when a cross-chain message reverts. +It's useful to rollback to the original state + +## ZetaTokenConsumer + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInterfaces.sol + +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) +The interface can be implemented using different strategies, like UniswapV2, UniswapV3, etc + +### Function List + +* [getZetaFromEth(destinationAddress, minAmountOut)](#ZetaTokenConsumer-getZetaFromEth-address-uint256-) +* [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 + +* [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-) + +### Modifiers + +### Functions + +``` +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) +``` + + + +## ZetaCommonErrors + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaInterfaces.sol + +### Error List + +* [InvalidAddress()](#ZetaCommonErrors-InvalidAddress--) + +### Modifiers + +### Errors + +``` +InvalidAddress() (error) +``` + + + diff --git a/docs/evm/interfaces/ZetaNonEthInterface.md b/docs/evm/interfaces/ZetaNonEthInterface.md new file mode 100644 index 00000000..f577d28b --- /dev/null +++ b/docs/evm/interfaces/ZetaNonEthInterface.md @@ -0,0 +1,58 @@ +## ZetaNonEthInterface + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaNonEthInterface.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/interfaces/ZetaNonEthInterface.sol + +ZetaNonEthInterface is a mintable / burnable version of IERC20 + +### Function List + +* [burnFrom(account, amount)](#ZetaNonEthInterface-burnFrom-address-uint256-) +* [mint(mintee, value, internalSendHash)](#ZetaNonEthInterface-mint-address-uint256-bytes32-) + +### Event List + +* [Transfer(from, to, value)](#IERC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IERC20-Approval-address-address-uint256-) + +### Modifiers + +### Functions + +``` +burnFrom(address account, uint256 amount) (external function) +``` + + + +``` +mint(address mintee, uint256 value, bytes32 internalSendHash) (external 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/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/testing/ZetaInteractorMock.md b/docs/evm/testing/ZetaInteractorMock.md new file mode 100644 index 00000000..50bb62a6 --- /dev/null +++ b/docs/evm/testing/ZetaInteractorMock.md @@ -0,0 +1,94 @@ +## ZetaInteractorMock + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/testing/ZetaInteractorMock.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/testing/ZetaInteractorMock.sol + +### Function List + +* [constructor(zetaConnectorAddress)](#ZetaInteractorMock-constructor-address-) +* [onZetaMessage(zetaMessage)](#ZetaInteractorMock-onZetaMessage-struct-ZetaInterfaces-ZetaMessage-) +* [onZetaRevert(zetaRevert)](#ZetaInteractorMock-onZetaRevert-struct-ZetaInterfaces-ZetaRevert-) + +### Event List + +* [OwnershipTransferStarted(previousOwner, newOwner)](#Ownable2Step-OwnershipTransferStarted-address-address-) + +* [OwnershipTransferred(previousOwner, newOwner)](#Ownable-OwnershipTransferred-address-address-) + +### Error List + +* [InvalidDestinationChainId()](#ZetaInteractorErrors-InvalidDestinationChainId--) +* [InvalidCaller(caller)](#ZetaInteractorErrors-InvalidCaller-address-) +* [InvalidZetaMessageCall()](#ZetaInteractorErrors-InvalidZetaMessageCall--) +* [InvalidZetaRevertCall()](#ZetaInteractorErrors-InvalidZetaRevertCall--) + +### Modifiers + +### Functions + +``` +constructor(address zetaConnectorAddress) (public function) +``` + + + +``` +onZetaMessage(struct ZetaInterfaces.ZetaMessage zetaMessage) (external function) +``` + + + +onZetaMessage is called when a cross-chain message reaches a contract + +``` +onZetaRevert(struct ZetaInterfaces.ZetaRevert zetaRevert) (external function) +``` + + + +onZetaRevert is called when a cross-chain message reverts. +It's useful to rollback to the original state + +### Events + +``` +OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) (event) +``` + + + +``` +OwnershipTransferred(address indexed previousOwner, address indexed newOwner) (event) +``` + + + +### Errors + +``` +InvalidDestinationChainId() (error) +``` + + + +``` +InvalidCaller(address caller) (error) +``` + + + +``` +InvalidZetaMessageCall() (error) +``` + + + +``` +InvalidZetaRevertCall() (error) +``` + + + diff --git a/docs/evm/tools/ImmutableCreate2Factory.md b/docs/evm/tools/ImmutableCreate2Factory.md new file mode 100644 index 00000000..cab5c379 --- /dev/null +++ b/docs/evm/tools/ImmutableCreate2Factory.md @@ -0,0 +1,121 @@ +## Ownable + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ImmutableCreate2Factory.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ImmutableCreate2Factory.sol + +### Function List + +* [transferOwnership(newOwner)](#Ownable-transferOwnership-address-) + +### Modifiers + +### Functions + +``` +transferOwnership(address newOwner) (external function) +``` + + + +## ImmutableCreate2Factory + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ImmutableCreate2Factory.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ImmutableCreate2Factory.sol + +This contract has not yet been fully tested or audited - proceed with +caution and please share any exploits or optimizations you discover. + +### Modifier List + +* [containsCaller(salt)](#ImmutableCreate2Factory-containsCaller-bytes32-) + +### Function List + +* [safeCreate2Internal(salt, initializationCode)](#ImmutableCreate2Factory-safeCreate2Internal-bytes32-bytes-) +* [safeCreate2(salt, initializationCode)](#ImmutableCreate2Factory-safeCreate2-bytes32-bytes-) +* [findCreate2Address(salt, initCode)](#ImmutableCreate2Factory-findCreate2Address-bytes32-bytes-) +* [findCreate2AddressViaHash(salt, initCodeHash)](#ImmutableCreate2Factory-findCreate2AddressViaHash-bytes32-bytes32-) +* [hasBeenDeployed(deploymentAddress)](#ImmutableCreate2Factory-hasBeenDeployed-address-) +* [safeCreate2AndTransfer(salt, initializationCode)](#ImmutableCreate2Factory-safeCreate2AndTransfer-bytes32-bytes-) + +### Modifiers + +``` +containsCaller(bytes32 salt) (modifier) +``` + + + +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. + +### Functions + +``` +safeCreate2Internal(bytes32 salt, bytes initializationCode) → address deploymentAddress (internal function) +``` + + + +``` +safeCreate2(bytes32 salt, bytes initializationCode) → address deploymentAddress (public function) +``` + + + +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. + +``` +findCreate2Address(bytes32 salt, bytes initCode) → address deploymentAddress (external function) +``` + + + +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. + +``` +findCreate2AddressViaHash(bytes32 salt, bytes32 initCodeHash) → address deploymentAddress (external function) +``` + + + +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. + +``` +hasBeenDeployed(address deploymentAddress) → bool (external function) +``` + + + +Determine if a contract has already been deployed by the factory to a +given address. + +``` +safeCreate2AndTransfer(bytes32 salt, bytes initializationCode) → address deploymentAddress (external function) +``` + + + diff --git a/docs/evm/tools/ZetaInteractor.md b/docs/evm/tools/ZetaInteractor.md new file mode 100644 index 00000000..ff4a2399 --- /dev/null +++ b/docs/evm/tools/ZetaInteractor.md @@ -0,0 +1,108 @@ +## ZetaInteractor + +```solidity +import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/evm/tools/ZetaInteractor.sol + +### Modifier List + +* [isValidMessageCall(zetaMessage)](#ZetaInteractor-isValidMessageCall-struct-ZetaInterfaces-ZetaMessage-) +* [isValidRevertCall(zetaRevert)](#ZetaInteractor-isValidRevertCall-struct-ZetaInterfaces-ZetaRevert-) + +### Function List + +* [constructor(zetaConnectorAddress)](#ZetaInteractor-constructor-address-) +* [_isValidChainId(chainId)](#ZetaInteractor-_isValidChainId-uint256-) +* [setInteractorByChainId(destinationChainId, contractAddress)](#ZetaInteractor-setInteractorByChainId-uint256-bytes-) + +### Event List + +* [OwnershipTransferStarted(previousOwner, newOwner)](#Ownable2Step-OwnershipTransferStarted-address-address-) + +* [OwnershipTransferred(previousOwner, newOwner)](#Ownable-OwnershipTransferred-address-address-) + +### Error List + +* [InvalidDestinationChainId()](#ZetaInteractorErrors-InvalidDestinationChainId--) +* [InvalidCaller(caller)](#ZetaInteractorErrors-InvalidCaller-address-) +* [InvalidZetaMessageCall()](#ZetaInteractorErrors-InvalidZetaMessageCall--) +* [InvalidZetaRevertCall()](#ZetaInteractorErrors-InvalidZetaRevertCall--) + +### Modifiers + +``` +isValidMessageCall(struct ZetaInterfaces.ZetaMessage zetaMessage) (modifier) +``` + + + +``` +isValidRevertCall(struct ZetaInterfaces.ZetaRevert zetaRevert) (modifier) +``` + + + +### Functions + +``` +constructor(address zetaConnectorAddress) (internal function) +``` + + + +``` +_isValidChainId(uint256 chainId) → bool (internal function) +``` + + + +Useful for contracts that inherit from this one + +``` +setInteractorByChainId(uint256 destinationChainId, bytes contractAddress) (external function) +``` + + + +### Events + +``` +OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) (event) +``` + + + +``` +OwnershipTransferred(address indexed previousOwner, address indexed newOwner) (event) +``` + + + +### Errors + +``` +InvalidDestinationChainId() (error) +``` + + + +``` +InvalidCaller(address caller) (error) +``` + + + +``` +InvalidZetaMessageCall() (error) +``` + + + +``` +InvalidZetaRevertCall() (error) +``` + + + 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 new file mode 100644 index 00000000..208f879f --- /dev/null +++ b/docs/zevm/Interfaces.md @@ -0,0 +1,290 @@ +## ISystem + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/Interfaces.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/Interfaces.sol + +Interfaces of SystemContract and ZRC20 to make easier to import. + +### Function List + +* [FUNGIBLE_MODULE_ADDRESS()](#ISystem-FUNGIBLE_MODULE_ADDRESS--) +* [wZetaContractAddress()](#ISystem-wZetaContractAddress--) +* [uniswapv2FactoryAddress()](#ISystem-uniswapv2FactoryAddress--) +* [gasPriceByChainId(chainID)](#ISystem-gasPriceByChainId-uint256-) +* [gasCoinZRC20ByChainId(chainID)](#ISystem-gasCoinZRC20ByChainId-uint256-) +* [gasZetaPoolByChainId(chainID)](#ISystem-gasZetaPoolByChainId-uint256-) + +### Modifiers + +### Functions + +``` +FUNGIBLE_MODULE_ADDRESS() → address (external function) +``` + + + +``` +wZetaContractAddress() → address (external function) +``` + + + +``` +uniswapv2FactoryAddress() → address (external function) +``` + + + +``` +gasPriceByChainId(uint256 chainID) → uint256 (external function) +``` + + + +``` +gasCoinZRC20ByChainId(uint256 chainID) → address (external function) +``` + + + +``` +gasZetaPoolByChainId(uint256 chainID) → address (external function) +``` + + + +## IZRC20 + +```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 + +* [totalSupply()](#IZRC20-totalSupply--) +* [balanceOf(account)](#IZRC20-balanceOf-address-) +* [transfer(recipient, amount)](#IZRC20-transfer-address-uint256-) +* [allowance(owner, spender)](#IZRC20-allowance-address-address-) +* [approve(spender, amount)](#IZRC20-approve-address-uint256-) +* [transferFrom(sender, recipient, amount)](#IZRC20-transferFrom-address-address-uint256-) +* [deposit(to, amount)](#IZRC20-deposit-address-uint256-) +* [withdraw(to, amount)](#IZRC20-withdraw-bytes-uint256-) +* [withdrawGasFee()](#IZRC20-withdrawGasFee--) + +### Event List + +* [Transfer(from, to, value)](#IZRC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IZRC20-Approval-address-address-uint256-) +* [Deposit(from, to, value)](#IZRC20-Deposit-bytes-address-uint256-) +* [Withdrawal(from, to, value, gasfee, protocolFlatFee)](#IZRC20-Withdrawal-address-bytes-uint256-uint256-uint256-) +* [UpdatedSystemContract(systemContract)](#IZRC20-UpdatedSystemContract-address-) +* [UpdatedGasLimit(gasLimit)](#IZRC20-UpdatedGasLimit-uint256-) +* [UpdatedProtocolFlatFee(protocolFlatFee)](#IZRC20-UpdatedProtocolFlatFee-uint256-) + +### Modifiers + +### Functions + +``` +totalSupply() → uint256 (external function) +``` + + + +``` +balanceOf(address account) → uint256 (external function) +``` + + + +``` +transfer(address recipient, uint256 amount) → bool (external function) +``` + + + +``` +allowance(address owner, address spender) → uint256 (external function) +``` + + + +``` +approve(address spender, uint256 amount) → bool (external function) +``` + + + +``` +transferFrom(address sender, address recipient, uint256 amount) → bool (external function) +``` + + + +``` +deposit(address to, uint256 amount) → bool (external function) +``` + + + +``` +withdraw(bytes to, uint256 amount) → bool (external function) +``` + + + +``` +withdrawGasFee() → address, uint256 (external function) +``` + + + +### Events + +``` +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, uint256 gasfee, uint256 protocolFlatFee) (event) +``` + + + +``` +UpdatedSystemContract(address systemContract) (event) +``` + + + +``` +UpdatedGasLimit(uint256 gasLimit) (event) +``` + + + +``` +UpdatedProtocolFlatFee(uint256 protocolFlatFee) (event) +``` + + + +## IZRC20Metadata + +```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 + +* [name()](#IZRC20Metadata-name--) +* [symbol()](#IZRC20Metadata-symbol--) +* [decimals()](#IZRC20Metadata-decimals--) + +### Event List + +* [Transfer(from, to, value)](#IZRC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IZRC20-Approval-address-address-uint256-) +* [Deposit(from, to, value)](#IZRC20-Deposit-bytes-address-uint256-) +* [Withdrawal(from, to, value, gasfee, protocolFlatFee)](#IZRC20-Withdrawal-address-bytes-uint256-uint256-uint256-) +* [UpdatedSystemContract(systemContract)](#IZRC20-UpdatedSystemContract-address-) +* [UpdatedGasLimit(gasLimit)](#IZRC20-UpdatedGasLimit-uint256-) +* [UpdatedProtocolFlatFee(protocolFlatFee)](#IZRC20-UpdatedProtocolFlatFee-uint256-) + +### Modifiers + +### Functions + +``` +name() → string (external function) +``` + + + +``` +symbol() → string (external function) +``` + + + +``` +decimals() → uint8 (external function) +``` + + + +### Events + +``` +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, uint256 gasfee, uint256 protocolFlatFee) (event) +``` + + + +``` +UpdatedSystemContract(address systemContract) (event) +``` + + + +``` +UpdatedGasLimit(uint256 gasLimit) (event) +``` + + + +``` +UpdatedProtocolFlatFee(uint256 protocolFlatFee) (event) +``` + + + +## CoinType + +```solidity +enum CoinType { + Zeta, + Gas, + ERC20 +} +``` diff --git a/docs/zevm/Uniswap.md b/docs/zevm/Uniswap.md new file mode 100644 index 00000000..4cb063da --- /dev/null +++ b/docs/zevm/Uniswap.md @@ -0,0 +1,10 @@ +## UniswapImports + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/Uniswap.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/Uniswap.sol + +### Modifiers + diff --git a/docs/zevm/UniswapPeriphery.md b/docs/zevm/UniswapPeriphery.md new file mode 100644 index 00000000..5af60fa0 --- /dev/null +++ b/docs/zevm/UniswapPeriphery.md @@ -0,0 +1,10 @@ +## UniswapImports + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/UniswapPeriphery.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/UniswapPeriphery.sol + +### Modifiers + diff --git a/docs/zevm/WZETA.md b/docs/zevm/WZETA.md new file mode 100644 index 00000000..70130944 --- /dev/null +++ b/docs/zevm/WZETA.md @@ -0,0 +1,97 @@ +## WETH9 + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/WZETA.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/WZETA.sol + +### Function List + +* [()](#WETH9-undefined--) +* [deposit()](#WETH9-deposit--) +* [withdraw(wad)](#WETH9-withdraw-uint256-) +* [totalSupply()](#WETH9-totalSupply--) +* [approve(guy, wad)](#WETH9-approve-address-uint256-) +* [transfer(dst, wad)](#WETH9-transfer-address-uint256-) +* [transferFrom(src, dst, wad)](#WETH9-transferFrom-address-address-uint256-) + +### Event List + +* [Approval(src, guy, wad)](#WETH9-Approval-address-address-uint256-) +* [Transfer(src, dst, wad)](#WETH9-Transfer-address-address-uint256-) +* [Deposit(dst, wad)](#WETH9-Deposit-address-uint256-) +* [Withdrawal(src, wad)](#WETH9-Withdrawal-address-uint256-) + +### Modifiers + +### Functions + +``` +() (public function) +``` + + + +``` +deposit() (public function) +``` + + + +``` +withdraw(uint256 wad) (public function) +``` + + + +``` +totalSupply() → uint256 (public function) +``` + + + +``` +approve(address guy, uint256 wad) → bool (public function) +``` + + + +``` +transfer(address dst, uint256 wad) → bool (public function) +``` + + + +``` +transferFrom(address src, address dst, uint256 wad) → bool (public function) +``` + + + +### Events + +``` +Approval(address indexed src, address indexed guy, uint256 wad) (event) +``` + + + +``` +Transfer(address indexed src, address indexed dst, uint256 wad) (event) +``` + + + +``` +Deposit(address indexed dst, uint256 wad) (event) +``` + + + +``` +Withdrawal(address indexed src, uint256 wad) (event) +``` + + + diff --git a/docs/zevm/ZRC20.md b/docs/zevm/ZRC20.md new file mode 100644 index 00000000..bfc137d7 --- /dev/null +++ b/docs/zevm/ZRC20.md @@ -0,0 +1,411 @@ +## ZRC20Errors + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/ZRC20.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/ZRC20.sol + +Custom errors for ZRC20 + +### Error List + +* [CallerIsNotFungibleModule()](#ZRC20Errors-CallerIsNotFungibleModule--) +* [InvalidSender()](#ZRC20Errors-InvalidSender--) +* [GasFeeTransferFailed()](#ZRC20Errors-GasFeeTransferFailed--) +* [ZeroGasCoin()](#ZRC20Errors-ZeroGasCoin--) +* [ZeroGasPrice()](#ZRC20Errors-ZeroGasPrice--) +* [LowAllowance()](#ZRC20Errors-LowAllowance--) +* [LowBalance()](#ZRC20Errors-LowBalance--) +* [ZeroAddress()](#ZRC20Errors-ZeroAddress--) + +### Modifiers + +### Errors + +``` +CallerIsNotFungibleModule() (error) +``` + + + +``` +InvalidSender() (error) +``` + + + +``` +GasFeeTransferFailed() (error) +``` + + + +``` +ZeroGasCoin() (error) +``` + + + +``` +ZeroGasPrice() (error) +``` + + + +``` +LowAllowance() (error) +``` + + + +``` +LowBalance() (error) +``` + + + +``` +ZeroAddress() (error) +``` + + + +## ZRC20 + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/ZRC20.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/ZRC20.sol + +### Modifier List + +* [onlyFungible()](#ZRC20-onlyFungible--) + +### 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--) +* [decimals()](#ZRC20-decimals--) +* [totalSupply()](#ZRC20-totalSupply--) +* [balanceOf(account)](#ZRC20-balanceOf-address-) +* [transfer(recipient, amount)](#ZRC20-transfer-address-uint256-) +* [allowance(owner, spender)](#ZRC20-allowance-address-address-) +* [approve(spender, amount)](#ZRC20-approve-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-) +* [_mint(account, amount)](#ZRC20-_mint-address-uint256-) +* [_burn(account, amount)](#ZRC20-_burn-address-uint256-) +* [_approve(owner, spender, amount)](#ZRC20-_approve-address-address-uint256-) +* [deposit(to, amount)](#ZRC20-deposit-address-uint256-) +* [withdrawGasFee()](#ZRC20-withdrawGasFee--) +* [withdraw(to, amount)](#ZRC20-withdraw-bytes-uint256-) +* [updateSystemContractAddress(addr)](#ZRC20-updateSystemContractAddress-address-) +* [updateGasLimit(gasLimit)](#ZRC20-updateGasLimit-uint256-) +* [updateProtocolFlatFee(protocolFlatFee)](#ZRC20-updateProtocolFlatFee-uint256-) + +### Event List + +* [Transfer(from, to, value)](#IZRC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IZRC20-Approval-address-address-uint256-) +* [Deposit(from, to, value)](#IZRC20-Deposit-bytes-address-uint256-) +* [Withdrawal(from, to, value, gasfee, protocolFlatFee)](#IZRC20-Withdrawal-address-bytes-uint256-uint256-uint256-) +* [UpdatedSystemContract(systemContract)](#IZRC20-UpdatedSystemContract-address-) +* [UpdatedGasLimit(gasLimit)](#IZRC20-UpdatedGasLimit-uint256-) +* [UpdatedProtocolFlatFee(protocolFlatFee)](#IZRC20-UpdatedProtocolFlatFee-uint256-) + +### Error List + +* [CallerIsNotFungibleModule()](#ZRC20Errors-CallerIsNotFungibleModule--) +* [InvalidSender()](#ZRC20Errors-InvalidSender--) +* [GasFeeTransferFailed()](#ZRC20Errors-GasFeeTransferFailed--) +* [ZeroGasCoin()](#ZRC20Errors-ZeroGasCoin--) +* [ZeroGasPrice()](#ZRC20Errors-ZeroGasPrice--) +* [LowAllowance()](#ZRC20Errors-LowAllowance--) +* [LowBalance()](#ZRC20Errors-LowBalance--) +* [ZeroAddress()](#ZRC20Errors-ZeroAddress--) + +### Modifiers + +``` +onlyFungible() (modifier) +``` + + + +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) +``` + + + +The only one allowed to deploy new ZRC20 is fungible address. + +``` +name() → string (public function) +``` + + + +ZRC20 name + +``` +symbol() → string (public function) +``` + + + +ZRC20 symbol. + +``` +decimals() → uint8 (public function) +``` + + + +ZRC20 decimals. + +``` +totalSupply() → uint256 (public function) +``` + + + +ZRC20 total supply. + +``` +balanceOf(address account) → uint256 (public function) +``` + + + +Returns ZRC20 balance of an account. + +``` +transfer(address recipient, uint256 amount) → bool (public function) +``` + + + +Returns ZRC20 balance of an account. + +``` +allowance(address owner, address spender) → uint256 (public function) +``` + + + +Returns token allowance from owner to spender. + +``` +approve(address spender, uint256 amount) → bool (public function) +``` + + + +Approves amount transferFrom for spender. + +``` +transferFrom(address sender, address recipient, uint256 amount) → bool (public function) +``` + + + +Transfers tokens from sender to recipient. + +``` +burn(uint256 amount) → bool (external function) +``` + + + +Burns an amount of tokens. + +``` +_transfer(address sender, address recipient, uint256 amount) (internal function) +``` + + + +``` +_mint(address account, uint256 amount) (internal function) +``` + + + +``` +_burn(address account, uint256 amount) (internal function) +``` + + + +``` +_approve(address owner, address spender, uint256 amount) (internal function) +``` + + + +``` +deposit(address to, uint256 amount) → bool (external function) +``` + + + +Deposits corresponding tokens from external chain, only callable by Fungible module. + +``` +withdrawGasFee() → address, uint256 (public function) +``` + + + +Withdraws gas fees. + +``` +withdraw(bytes to, uint256 amount) → bool (external function) +``` + + + +Withraws ZRC20 tokens to external chains, this function causes cctx module to send out outbound tx to the outbound chain +this contract should be given enough allowance of the gas ZRC20 to pay for outbound tx gas fee. + +``` +updateSystemContractAddress(address addr) (external function) +``` + + + +Updates system contract address. Can only be updated by the fungible module. + +``` +updateGasLimit(uint256 gasLimit) (external function) +``` + + + +Updates gas limit. Can only be updated by the fungible module. + +``` +updateProtocolFlatFee(uint256 protocolFlatFee) (external function) +``` + + + +Updates protocol flat fee. Can only be updated by the fungible module. + +### Events + +``` +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, uint256 gasfee, uint256 protocolFlatFee) (event) +``` + + + +``` +UpdatedSystemContract(address systemContract) (event) +``` + + + +``` +UpdatedGasLimit(uint256 gasLimit) (event) +``` + + + +``` +UpdatedProtocolFlatFee(uint256 protocolFlatFee) (event) +``` + + + +### Errors + +``` +CallerIsNotFungibleModule() (error) +``` + + + +``` +InvalidSender() (error) +``` + + + +``` +GasFeeTransferFailed() (error) +``` + + + +``` +ZeroGasCoin() (error) +``` + + + +``` +ZeroGasPrice() (error) +``` + + + +``` +LowAllowance() (error) +``` + + + +``` +LowBalance() (error) +``` + + + +``` +ZeroAddress() (error) +``` + + + 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/IZRC20.md b/docs/zevm/interfaces/IZRC20.md new file mode 100644 index 00000000..74a5781b --- /dev/null +++ b/docs/zevm/interfaces/IZRC20.md @@ -0,0 +1,160 @@ +## IZRC20 + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/interfaces/IZRC20.sol + +### Function List + +* [totalSupply()](#IZRC20-totalSupply--) +* [balanceOf(account)](#IZRC20-balanceOf-address-) +* [transfer(recipient, amount)](#IZRC20-transfer-address-uint256-) +* [allowance(owner, spender)](#IZRC20-allowance-address-address-) +* [approve(spender, amount)](#IZRC20-approve-address-uint256-) +* [decreaseAllowance(spender, amount)](#IZRC20-decreaseAllowance-address-uint256-) +* [increaseAllowance(spender, amount)](#IZRC20-increaseAllowance-address-uint256-) +* [transferFrom(sender, recipient, amount)](#IZRC20-transferFrom-address-address-uint256-) +* [deposit(to, amount)](#IZRC20-deposit-address-uint256-) +* [burn(account, amount)](#IZRC20-burn-address-uint256-) +* [withdraw(to, amount)](#IZRC20-withdraw-bytes-uint256-) +* [withdrawGasFee()](#IZRC20-withdrawGasFee--) +* [PROTOCOL_FEE()](#IZRC20-PROTOCOL_FEE--) + +### Event List + +* [Transfer(from, to, value)](#IZRC20-Transfer-address-address-uint256-) +* [Approval(owner, spender, value)](#IZRC20-Approval-address-address-uint256-) +* [Deposit(from, to, value)](#IZRC20-Deposit-bytes-address-uint256-) +* [Withdrawal(from, to, value, gasFee, protocolFlatFee)](#IZRC20-Withdrawal-address-bytes-uint256-uint256-uint256-) +* [UpdatedSystemContract(systemContract)](#IZRC20-UpdatedSystemContract-address-) +* [UpdatedGasLimit(gasLimit)](#IZRC20-UpdatedGasLimit-uint256-) +* [UpdatedProtocolFlatFee(protocolFlatFee)](#IZRC20-UpdatedProtocolFlatFee-uint256-) + +### Modifiers + +### Functions + +``` +totalSupply() → uint256 (external function) +``` + + + +``` +balanceOf(address account) → uint256 (external function) +``` + + + +``` +transfer(address recipient, uint256 amount) → bool (external function) +``` + + + +``` +allowance(address owner, address spender) → uint256 (external function) +``` + + + +``` +approve(address spender, uint256 amount) → bool (external function) +``` + + + +``` +decreaseAllowance(address spender, uint256 amount) → bool (external function) +``` + + + +``` +increaseAllowance(address spender, uint256 amount) → bool (external function) +``` + + + +``` +transferFrom(address sender, address recipient, uint256 amount) → bool (external function) +``` + + + +``` +deposit(address to, uint256 amount) → bool (external function) +``` + + + +``` +burn(address account, uint256 amount) → bool (external function) +``` + + + +``` +withdraw(bytes to, uint256 amount) → bool (external function) +``` + + + +``` +withdrawGasFee() → address, uint256 (external function) +``` + + + +``` +PROTOCOL_FEE() → uint256 (external function) +``` + + + +### Events + +``` +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, uint256 gasFee, uint256 protocolFlatFee) (event) +``` + + + +``` +UpdatedSystemContract(address systemContract) (event) +``` + + + +``` +UpdatedGasLimit(uint256 gasLimit) (event) +``` + + + +``` +UpdatedProtocolFlatFee(uint256 protocolFlatFee) (event) +``` + + + diff --git a/docs/zevm/interfaces/zContract.md b/docs/zevm/interfaces/zContract.md new file mode 100644 index 00000000..f47c2ca6 --- /dev/null +++ b/docs/zevm/interfaces/zContract.md @@ -0,0 +1,31 @@ +## zContext + +```solidity +struct zContext { + bytes origin; + address sender; + uint256 chainID; +} +``` +## zContract + +```solidity +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/zevm/interfaces/zContract.sol + +### Function List + +* [onCrossChainCall(context, zrc20, amount, message)](#zContract-onCrossChainCall-struct-zContext-address-uint256-bytes-) + +### Modifiers + +### Functions + +``` +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/hardhat.config.ts b/hardhat.config.ts index bbf4aef7..0eef37b1 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -4,6 +4,7 @@ import "@typechain/hardhat"; import "tsconfig-paths/register"; import "hardhat-abi-exporter"; import "./tasks/addresses"; +import "solidity-docgen"; import { getHardhatConfigNetworks } from "@zetachain/networks"; import * as dotenv from "dotenv"; @@ -12,6 +13,10 @@ import type { HardhatUserConfig } from "hardhat/types"; dotenv.config(); const config: HardhatUserConfig = { + docgen: { + pages: "files", + templates: "templates", + }, //@ts-ignore etherscan: { apiKey: { diff --git a/package.json b/package.json index 83fd2a42..353c7da8 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,11 @@ "hardhat": "^2.13.1", "hardhat-abi-exporter": "^2.10.1", "hardhat-gas-reporter": "^1.0.9", + "http-server": "^14.1.1", "inquirer": "^8.2.4", "mocha": "^10.2.0", "solidity-coverage": "^0.8.2", + "solidity-docgen": "^0.6.0-beta.36", "ts-mocha": "^10.0.0", "ts-node": "10.8.1", "tsconfig-paths": "^3.14.1", @@ -75,8 +77,9 @@ "lint:fix": "npx eslint . --ext .js,.ts,.json --fix", "prepublishOnly": "yarn build", "test": "yarn compile && npx hardhat test", - "tsc:watch": "npx tsc --watch" + "tsc:watch": "npx tsc --watch", + "docs": "npx hardhat docgen" }, "types": "./dist/lib/index.d.ts", "version": "0.0.8" -} +} \ No newline at end of file diff --git a/templates/contract.hbs b/templates/contract.hbs new file mode 100644 index 00000000..84075d9a --- /dev/null +++ b/templates/contract.hbs @@ -0,0 +1,118 @@ +## {{name}} + +```solidity +import "@zetachain/protocol-contracts/{{__item_context.file.absolutePath}}"; +``` + +Source: https://github.com/zeta-chain/protocol-contracts/blob/main/{{__item_context.file.absolutePath}} + +{{{natspec.dev}}} + +{{#if modifiers}} +### Modifier List + +{{#each modifiers}} +* [{{name}}({{names params}})](#{{anchor}}) +{{/each}} +{{/if}} + +{{#if has-functions}} +### Function List + +{{#each functions}} +* [{{name}}({{names params}})](#{{anchor}}) +{{/each}} + +{{/if}} + +{{#if has-events}} +### Event List + +{{#each inheritance}} +{{#each events}} +* [{{name}}({{names params}})](#{{anchor}}) +{{/each}} + +{{/each}} +{{/if}} + +{{#if has-errors}} +### Error List + +{{#each inheritance}} +{{#each errors}} +* [{{name}}({{names params}})](#{{anchor}}) +{{/each}} + +{{/each}} +{{/if}} + +### Modifiers + +{{#each modifiers}} + +``` +{{name}}({{typed-params params}}) (modifier) +``` + + + +{{{natspec.dev}}} + +{{/each}} + +{{#if has-functions}} + +### Functions + +{{#each functions}} + +``` +{{name}}({{typed-params params}}){{#if returns}} → {{typed-params returns}}{{/if}} ({{visibility}} function) +``` + + + +{{{natspec.dev}}} + +{{/each}} + +{{/if}} + +{{#if has-events}} + +### Events + +{{#each inheritance}} +{{#each events}} + +``` +{{name}}({{typed-params params}}) (event) +``` + + + +{{{natspec.dev}}} + +{{/each}} +{{/each}} +{{/if}} + +{{#if has-errors}} + +### Errors + +{{#each inheritance}} +{{#each errors}} + +``` +{{name}}({{typed-params params}}) (error) +``` + + + +{{{natspec.dev}}} + +{{/each}} +{{/each}} +{{/if}} \ No newline at end of file diff --git a/templates/helpers.js b/templates/helpers.js new file mode 100644 index 00000000..3eda5139 --- /dev/null +++ b/templates/helpers.js @@ -0,0 +1,12 @@ +module.exports.names = (params) => params.map((p) => p.name).join(", "); + +module.exports["typed-params"] = (params) => { + return params?.map((p) => `${p.type}${p.indexed ? " indexed" : ""}${p.name ? " " + p.name : ""}`).join(", "); +}; + +const slug = (module.exports.slug = (str) => { + if (str === undefined) { + throw new Error("Missing argument"); + } + return str.replace(/\W/g, "-"); +}); diff --git a/templates/page.hbs b/templates/page.hbs new file mode 100644 index 00000000..d2a1f06f --- /dev/null +++ b/templates/page.hbs @@ -0,0 +1,5 @@ +{{#each items}} +{{#hsection}} +{{>item}} +{{/hsection}} +{{/each}} \ No newline at end of file diff --git a/templates/properties.js b/templates/properties.js new file mode 100644 index 00000000..ee9a580e --- /dev/null +++ b/templates/properties.js @@ -0,0 +1,40 @@ +const { isNodeType } = require("solidity-ast/utils"); +const { slug } = require("./helpers"); + +module.exports.anchor = function anchor({ item, contract }) { + let res = ""; + if (contract) { + res += contract.name + "-"; + } + res += item.name; + if ("parameters" in item) { + const signature = item.parameters.parameters.map((v) => v.typeName.typeDescriptions.typeString).join(","); + res += slug("(" + signature + ")"); + } + if (isNodeType("VariableDeclaration", item)) { + res += "-" + slug(item.typeName.typeDescriptions.typeString); + } + return res; +}; + +module.exports.inheritance = function ({ item, build }) { + if (!isNodeType("ContractDefinition", item)) { + throw new Error("used inherited-items on non-contract"); + } + + return item.linearizedBaseContracts + .map((id) => build.deref("ContractDefinition", id)) + .filter((c, i) => c.name !== "Context" || i === 0); +}; + +module.exports["has-functions"] = function ({ item }) { + return item.inheritance.some((c) => c.functions.length > 0); +}; + +module.exports["has-events"] = function ({ item }) { + return item.inheritance.some((c) => c.events.length > 0); +}; + +module.exports["has-errors"] = function ({ item }) { + return item.inheritance.some((c) => c.errors.length > 0); +}; diff --git a/typechain-types/factories/contracts/evm/tools/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts b/typechain-types/factories/contracts/evm/tools/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts index 0f3b7068..442eda64 100644 --- a/typechain-types/factories/contracts/evm/tools/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts +++ b/typechain-types/factories/contracts/evm/tools/ImmutableCreate2Factory.sol/ImmutableCreate2Factory__factory.ts @@ -124,7 +124,7 @@ const _abi = [ ] as const; const _bytecode = - "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820df6f8cf8f81946679a805d41e12170a28006ccfb64bce758c74108440cc9337b64736f6c634300050a0032"; + "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820564fe293284925324008528f44bf617c14217db6cc270facfdf183de35c1883664736f6c634300050a0032"; type ImmutableCreate2FactoryConstructorParams = | [signer?: Signer] diff --git a/yarn.lock b/yarn.lock index 62ba3eb5..fa6ec327 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2361,6 +2361,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" @@ -2392,6 +2400,17 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.findlast@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.4.tgz#eeb9e45fc894055c82e5675c463e8077b827ad36" + integrity sha512-BMtLxpV+8BD+6ZPFIWmnUBpQoy+A+ujcg4rhp2iwCRJYA7PEh2MS4NL3lz8EiDlLrJPp2hg9qWihr5pd//jcGw== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" @@ -2423,6 +2442,20 @@ array.prototype.reduce@^1.0.5: es-array-method-boxes-properly "^1.0.0" is-string "^1.0.7" +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -2477,7 +2510,7 @@ async@1.x: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== -async@^2.4.0: +async@^2.4.0, async@^2.6.4: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== @@ -2504,6 +2537,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2566,6 +2606,13 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +basic-auth@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== + dependencies: + safe-buffer "5.1.2" + bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -2835,6 +2882,17 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -3237,6 +3295,11 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +corser@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87" + integrity sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ== + cpx@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f" @@ -3435,6 +3498,15 @@ deferred-leveldown@~5.3.0: abstract-leveldown "~6.2.1" inherits "^2.0.3" +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -3443,6 +3515,15 @@ define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -3699,11 +3780,70 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.22.1, es-abstract@^1.22.3: + version "1.22.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.5.tgz#1417df4e97cc55f09bf7e58d1e614bc61cb8df46" + integrity sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.1" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.0" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.5" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.14" + es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -3713,6 +3853,15 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -3720,6 +3869,13 @@ es-shim-unscopables@^1.0.0: dependencies: has "^1.0.3" +es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -4251,6 +4407,11 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -4516,6 +4677,11 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +follow-redirects@^1.0.0: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + follow-redirects@^1.12.1: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" @@ -4675,6 +4841,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" @@ -4685,12 +4856,22 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== -functions-have-names@^1.2.2: +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -4731,6 +4912,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-port@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" @@ -4744,6 +4936,15 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4960,6 +5161,18 @@ handlebars@^4.0.1: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.7: + version "4.7.8" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.2" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -5078,11 +5291,23 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -5095,6 +5320,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -5158,7 +5390,14 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -he@1.2.0: +hasown@^2.0.0, hasown@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +he@1.2.0, he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -5189,6 +5428,13 @@ hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + http-basic@^8.1.1: version "8.1.3" resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" @@ -5210,6 +5456,15 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + http-response-object@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" @@ -5217,6 +5472,25 @@ http-response-object@^3.0.1: dependencies: "@types/node" "^10.0.3" +http-server@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/http-server/-/http-server-14.1.1.tgz#d60fbb37d7c2fdff0f0fbff0d0ee6670bd285e2e" + integrity sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A== + dependencies: + basic-auth "^2.0.1" + chalk "^4.1.2" + corser "^2.0.1" + he "^1.2.0" + html-encoding-sniffer "^3.0.0" + http-proxy "^1.18.1" + mime "^1.6.0" + minimist "^1.2.6" + opener "^1.5.1" + portfinder "^1.0.28" + secure-compare "3.0.1" + union "~0.5.0" + url-join "^4.0.1" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -5246,6 +5520,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -5342,6 +5623,15 @@ internal-slot@^1.0.5: has "^1.0.3" side-channel "^1.0.4" +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -5377,6 +5667,14 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -5559,6 +5857,11 @@ is-negative-zero@^2.0.2: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -5647,6 +5950,13 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" +is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -5679,6 +5989,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -5711,6 +6028,11 @@ isarray@1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -6388,6 +6710,11 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.52.0" +mime@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -6463,7 +6790,7 @@ mkdirp@0.5.5: dependencies: minimist "^1.2.5" -mkdirp@0.5.x, mkdirp@^0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -6646,7 +6973,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -neo-async@^2.6.0: +neo-async@^2.6.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -6769,6 +7096,11 @@ object-inspect@^1.12.3, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + object-keys@^1.0.11, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -6801,6 +7133,16 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + object.getownpropertydescriptors@^2.0.3: version "2.1.5" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.5.tgz#db5a9002489b64eef903df81d6623c07e5b4b4d3" @@ -6854,6 +7196,11 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +opener@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7108,11 +7455,25 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +portfinder@^1.0.28: + version "1.0.32" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81" + integrity sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg== + dependencies: + async "^2.6.4" + debug "^3.2.7" + mkdirp "^0.5.6" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + preferred-pm@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.0.3.tgz#1b6338000371e3edbce52ef2e4f65eb2e73586d6" @@ -7412,6 +7773,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + regexpp@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -7508,6 +7879,11 @@ requireindex@~1.2.0: resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -7643,16 +8019,26 @@ rxjs@^7.2.0, rxjs@^7.5.5: dependencies: tslib "^2.1.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-array-concat@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -7662,6 +8048,15 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -7669,7 +8064,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -7727,6 +8122,11 @@ secp256k1@^3.0.1: nan "^2.14.0" safe-buffer "^5.1.2" +secure-compare@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/secure-compare/-/secure-compare-3.0.1.tgz#f1a0329b308b221fae37b9974f3d578d0ca999e3" + integrity sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw== + seedrandom@3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" @@ -7766,6 +8166,28 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -7948,6 +8370,13 @@ solc@0.8.15: semver "^5.5.0" tmp "0.0.33" +solidity-ast@^0.4.38: + version "0.4.55" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.55.tgz#00b685e6eefb2e8dfb67df1fe0afbe3b3bfb4b28" + integrity sha512-qeEU/r/K+V5lrAw8iswf2/yfWAnSGs3WKPHI+zAFKFjX0dIBVXEU/swQ8eJQYHf6PJWUZFO2uWV4V1wEOkeQbA== + dependencies: + array.prototype.findlast "^1.2.2" + solidity-coverage@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" @@ -7974,6 +8403,14 @@ solidity-coverage@^0.8.2: shelljs "^0.8.3" web3-utils "^1.3.6" +solidity-docgen@^0.6.0-beta.36: + 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" @@ -8153,6 +8590,15 @@ string.prototype.trim@^1.2.7: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" @@ -8162,6 +8608,15 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" @@ -8171,6 +8626,15 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -8620,6 +9084,38 @@ typechain@^8.0.0, typechain@^8.1.0: ts-command-line-args "^2.2.0" ts-essentials "^7.0.1" +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -8629,6 +9125,18 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-array-length@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.5.tgz#57d44da160296d8663fd63180a1802ebf25905d5" + integrity sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -8681,6 +9189,13 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +union@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/union/-/union-0.5.0.tgz#b2c11be84f60538537b846edb9ba266ba0090075" + integrity sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA== + dependencies: + qs "^6.4.0" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -8716,6 +9231,11 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== +url-join@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" + integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -8813,6 +9333,13 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -8845,6 +9372,17 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" +which-typed-array@^1.1.14: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" From 4af74b39a9eccbb856b13305a4fd0d1c15fd3a17 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 12 Mar 2024 11:22:57 +0500 Subject: [PATCH 2/3] yarn generate --- package.json | 6 +++--- .../immutablecreate2factory.sol/immutablecreate2factory.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 353c7da8..5a5c5c64 100644 --- a/package.json +++ b/package.json @@ -72,14 +72,14 @@ "scripts": { "build": "yarn compile && npx del-cli dist abi && npx tsc || true && npx del-cli './dist/typechain-types/**/*.js' && npx cpx './data/**/*' dist/data && npx cpx './artifacts/contracts/**/*' ./abi && npx del-cli './abi/**/*.dbg.json'", "compile": "npx hardhat compile --force", + "docs": "npx hardhat docgen", "generate": "yarn compile && ./scripts/generate_go.sh || true && ./scripts/generate_addresses.sh && yarn lint:fix", "lint": "npx eslint . --ext .js,.ts", "lint:fix": "npx eslint . --ext .js,.ts,.json --fix", "prepublishOnly": "yarn build", "test": "yarn compile && npx hardhat test", - "tsc:watch": "npx tsc --watch", - "docs": "npx hardhat docgen" + "tsc:watch": "npx tsc --watch" }, "types": "./dist/lib/index.d.ts", "version": "0.0.8" -} \ No newline at end of file +} diff --git a/pkg/contracts/evm/tools/immutablecreate2factory.sol/immutablecreate2factory.go b/pkg/contracts/evm/tools/immutablecreate2factory.sol/immutablecreate2factory.go index f1140f79..32102c0d 100644 --- a/pkg/contracts/evm/tools/immutablecreate2factory.sol/immutablecreate2factory.go +++ b/pkg/contracts/evm/tools/immutablecreate2factory.sol/immutablecreate2factory.go @@ -32,7 +32,7 @@ var ( // ImmutableCreate2FactoryMetaData contains all meta data concerning the ImmutableCreate2Factory contract. var ImmutableCreate2FactoryMetaData = &bind.MetaData{ 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\"}]", - Bin: "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820df6f8cf8f81946679a805d41e12170a28006ccfb64bce758c74108440cc9337b64736f6c634300050a0032", + Bin: "0x608060405234801561001057600080fd5b50610c54806100206000396000f3fe60806040526004361061004a5760003560e01c806308508b8f1461004f57806329346003146100b857806364e030871461017b57806385cf97ab14610280578063a49a7c9014610350575b600080fd5b34801561005b57600080fd5b5061009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b610139600480360360408110156100ce57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f557600080fd5b82018360208201111561010757600080fd5b8035906020019184600183028401116401000000008311171561012957600080fd5b909192939192939050505061042a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61023e6004803603604081101561019157600080fd5b8101908080359060200190929190803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105cf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028c57600080fd5b5061030e600480360360408110156102a357600080fd5b8101908080359060200190929190803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b9091929391929390505050610698565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035c57600080fd5b506103936004803603604081101561037357600080fd5b8101908080359060200190929190803590602001909291905050506107be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000833373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16148061048b5750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b6104e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61052e8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506108b4565b91508173ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b50505050509392505050565b6000823373ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614806106305750600060601b6bffffffffffffffffffffffff1916816bffffffffffffffffffffffff1916145b610685576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180610b956045913960600191505060405180910390fd5b61068f84846108b4565b91505092915050565b6000308484846040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156107b657600090506107b7565b5b9392505050565b600030838360405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ad57600090506108ae565b5b92915050565b6000606082905060003085836040516020018082805190602001908083835b602083106108f657805182526020820191506020810190506020830392506108d3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610b56603f913960400191505060405180910390fd5b81602001825186818334f5945050508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526046815260200180610bda6046913960600191505060405180910390fd5b60016000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050509291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a72305820564fe293284925324008528f44bf617c14217db6cc270facfdf183de35c1883664736f6c634300050a0032", } // ImmutableCreate2FactoryABI is the input ABI used to generate the binding from. From a692bfff7cfacf8d8e58210c6be82381a0bcfea0 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 12 Mar 2024 11:24:36 +0500 Subject: [PATCH 3/3] add yarn docs --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5a5c5c64..353c7da8 100644 --- a/package.json +++ b/package.json @@ -72,14 +72,14 @@ "scripts": { "build": "yarn compile && npx del-cli dist abi && npx tsc || true && npx del-cli './dist/typechain-types/**/*.js' && npx cpx './data/**/*' dist/data && npx cpx './artifacts/contracts/**/*' ./abi && npx del-cli './abi/**/*.dbg.json'", "compile": "npx hardhat compile --force", - "docs": "npx hardhat docgen", "generate": "yarn compile && ./scripts/generate_go.sh || true && ./scripts/generate_addresses.sh && yarn lint:fix", "lint": "npx eslint . --ext .js,.ts", "lint:fix": "npx eslint . --ext .js,.ts,.json --fix", "prepublishOnly": "yarn build", "test": "yarn compile && npx hardhat test", - "tsc:watch": "npx tsc --watch" + "tsc:watch": "npx tsc --watch", + "docs": "npx hardhat docgen" }, "types": "./dist/lib/index.d.ts", "version": "0.0.8" -} +} \ No newline at end of file