diff --git a/src/pages/developers/architecture/protocol/SUMMARY.md b/src/pages/developers/architecture/protocol/SUMMARY.md index 694bd285..c2429043 100644 --- a/src/pages/developers/architecture/protocol/SUMMARY.md +++ b/src/pages/developers/architecture/protocol/SUMMARY.md @@ -32,6 +32,7 @@ - [CoinType](contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md) - [zContext](contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md) - [zContract](contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md) + - [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md) - [UniversalContract](contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md) - [GatewayZEVM](contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md) - [SystemContractErrors](contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md) diff --git a/src/pages/developers/architecture/protocol/contracts/Revert.sol/interface.Revertable.md b/src/pages/developers/architecture/protocol/contracts/Revert.sol/interface.Revertable.md index 0e44e885..182276c9 100644 --- a/src/pages/developers/architecture/protocol/contracts/Revert.sol/interface.Revertable.md +++ b/src/pages/developers/architecture/protocol/contracts/Revert.sol/interface.Revertable.md @@ -1,5 +1,5 @@ # Revertable -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/Revert.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/Revert.sol) Interface for contracts that support revertable calls. diff --git a/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertContext.md b/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertContext.md index ab1ac4d2..1627449a 100644 --- a/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertContext.md +++ b/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertContext.md @@ -1,5 +1,5 @@ # RevertContext -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/Revert.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/Revert.sol) Struct containing revert context passed to onRevert. @@ -8,7 +8,7 @@ Struct containing revert context passed to onRevert. struct RevertContext { address sender; address asset; - uint64 amount; + uint256 amount; bytes revertMessage; } ``` @@ -19,6 +19,6 @@ struct RevertContext { |----|----|-----------| |`sender`|`address`|Address of account that initiated smart contract call.| |`asset`|`address`|Address of asset, empty if it's gas token.| -|`amount`|`uint64`|Amount specified with the transaction.| +|`amount`|`uint256`|Amount specified with the transaction.| |`revertMessage`|`bytes`|Arbitrary data sent back in onRevert.| diff --git a/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertOptions.md b/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertOptions.md index 366e2410..d44be524 100644 --- a/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertOptions.md +++ b/src/pages/developers/architecture/protocol/contracts/Revert.sol/struct.RevertOptions.md @@ -1,5 +1,5 @@ # RevertOptions -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/Revert.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/Revert.sol) Struct containing revert options diff --git a/src/pages/developers/architecture/protocol/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md b/src/pages/developers/architecture/protocol/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md index 689e5653..25d174c4 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md @@ -1,8 +1,8 @@ # ERC20Custody -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/ERC20Custody.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/ERC20Custody.sol) **Inherits:** -[IERC20Custody](/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md), ReentrancyGuard, AccessControl, Pausable +Initializable, UUPSUpgradeable, [IERC20Custody](/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md), ReentrancyGuardUpgradeable, AccessControlUpgradeable, PausableUpgradeable Holds the ERC20 tokens deposited on ZetaChain and includes functionality to call a contract. @@ -15,7 +15,7 @@ Gateway contract. ```solidity -IGatewayEVM public immutable gateway; +IGatewayEVM public gateway; ``` @@ -74,17 +74,32 @@ bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE"); ## Functions -### constructor +### initialize -Constructor for ERC20Custody. +Initializer for ERC20Custody. *Set admin as default admin and pauser, and tssAddress as tss role.* ```solidity -constructor(address gateway_, address tssAddress_, address admin_); +function initialize(address gateway_, address tssAddress_, address admin_) public initializer; ``` +### _authorizeUpgrade + +*Authorizes the upgrade of the contract, sender must be owner.* + + +```solidity +function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`newImplementation`|`address`|Address of the new implementation.| + + ### pause Pause contract. @@ -103,6 +118,21 @@ Unpause contract. function unpause() external onlyRole(PAUSER_ROLE); ``` +### updateTSSAddress + +Update tss address + + +```solidity +function updateTSSAddress(address newTSSAddress) external onlyRole(DEFAULT_ADMIN_ROLE); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`newTSSAddress`|`address`|new tss address| + + ### setSupportsLegacy Unpause contract. diff --git a/src/pages/developers/architecture/protocol/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md b/src/pages/developers/architecture/protocol/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md index a5e9c818..d8d0feb8 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md @@ -1,5 +1,5 @@ # GatewayEVM -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/GatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/GatewayEVM.sol) **Inherits:** Initializable, AccessControlUpgradeable, UUPSUpgradeable, [IGatewayEVM](/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md), ReentrancyGuardUpgradeable, PausableUpgradeable @@ -73,6 +73,15 @@ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); ``` +### MAX_PAYLOAD_SIZE +Max size of payload + revertOptions revert message. + + +```solidity +uint256 public constant MAX_PAYLOAD_SIZE = 1024; +``` + + ## Functions ### constructor @@ -107,6 +116,21 @@ function _authorizeUpgrade(address newImplementation) internal override onlyRole |`newImplementation`|`address`|Address of the new implementation.| +### updateTSSAddress + +Update tss address + + +```solidity +function updateTSSAddress(address newTSSAddress) external onlyRole(DEFAULT_ADMIN_ROLE); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`newTSSAddress`|`address`|new tss address| + + ### pause Pause contract. @@ -430,14 +454,14 @@ function setConnector(address zetaConnector_) external onlyRole(DEFAULT_ADMIN_RO |`zetaConnector_`|`address`|Address of the connector contract.| -### resetApproval +### _resetApproval *Resets the approval of a token for a specified address. This is used to ensure that the approval is set to zero before setting it to a new value.* ```solidity -function resetApproval(address token, address to) private returns (bool); +function _resetApproval(address token, address to) private returns (bool); ``` **Parameters** @@ -453,7 +477,7 @@ function resetApproval(address token, address to) private returns (bool); |``|`bool`|True if the approval reset was successful, false otherwise.| -### transferFromToAssetHandler +### _transferFromToAssetHandler *Transfers tokens from the sender to the asset handler. This function handles the transfer of tokens to either the connector or custody contract based on the asset @@ -461,7 +485,7 @@ type.* ```solidity -function transferFromToAssetHandler(address from, address token, uint256 amount) private; +function _transferFromToAssetHandler(address from, address token, uint256 amount) private; ``` **Parameters** @@ -472,7 +496,7 @@ function transferFromToAssetHandler(address from, address token, uint256 amount) |`amount`|`uint256`|Amount of tokens to transfer.| -### transferToAssetHandler +### _transferToAssetHandler *Transfers tokens to the asset handler. This function handles the transfer of tokens to either the connector or custody contract based on the asset @@ -480,7 +504,7 @@ type.* ```solidity -function transferToAssetHandler(address token, uint256 amount) private; +function _transferToAssetHandler(address token, uint256 amount) private; ``` **Parameters** @@ -541,10 +565,10 @@ function _executeAuthenticatedCall( |``|`bytes`|The result of the call.| -### revertIfOnCallOrOnRevert +### _revertIfOnCallOrOnRevert ```solidity -function revertIfOnCallOrOnRevert(bytes calldata data) private pure; +function _revertIfOnCallOrOnRevert(bytes calldata data) private pure; ``` diff --git a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md index bd21e0cc..f48c4772 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md @@ -1,8 +1,8 @@ # ZetaConnectorBase -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/ZetaConnectorBase.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/ZetaConnectorBase.sol) **Inherits:** -[IZetaConnectorEvents](/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md), ReentrancyGuard, Pausable, AccessControl +Initializable, UUPSUpgradeable, [IZetaConnectorEvents](/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md), ReentrancyGuardUpgradeable, PausableUpgradeable, AccessControlUpgradeable Abstract base contract for ZetaConnector. @@ -15,7 +15,7 @@ The Gateway contract used for executing cross-chain calls. ```solidity -IGatewayEVM public immutable gateway; +IGatewayEVM public gateway; ``` @@ -24,7 +24,16 @@ The address of the Zeta token. ```solidity -address public immutable zetaToken; +address public zetaToken; +``` + + +### tssAddress +The address of the TSS (Threshold Signature Scheme) contract. + + +```solidity +address public tssAddress; ``` @@ -56,17 +65,55 @@ bytes32 public constant TSS_ROLE = keccak256("TSS_ROLE"); ## Functions -### constructor +### initialize -Constructor for ZetaConnectors. +Initializer for ZetaConnectors. *Set admin as default admin and pauser, and tssAddress as tss role.* ```solidity -constructor(address gateway_, address zetaToken_, address tssAddress_, address admin_); +function initialize( + address gateway_, + address zetaToken_, + address tssAddress_, + address admin_ +) + public + virtual + initializer; ``` +### _authorizeUpgrade + +*Authorizes the upgrade of the contract, sender must be owner.* + + +```solidity +function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`newImplementation`|`address`|Address of the new implementation.| + + +### updateTSSAddress + +Update tss address + + +```solidity +function updateTSSAddress(address newTSSAddress) external onlyRole(DEFAULT_ADMIN_ROLE); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`newTSSAddress`|`address`|new tss address| + + ### pause Pause contract. diff --git a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md index ca5dfa6b..fff2281a 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md @@ -1,5 +1,5 @@ # ZetaConnectorNative -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/ZetaConnectorNative.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/ZetaConnectorNative.sol) **Inherits:** [ZetaConnectorBase](/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md) @@ -10,17 +10,19 @@ Implementation of ZetaConnectorBase for native token handling. ## Functions -### constructor +### initialize ```solidity -constructor( +function initialize( address gateway_, address zetaToken_, address tssAddress_, address admin_ ) - ZetaConnectorBase(gateway_, zetaToken_, tssAddress_, admin_); + public + override + initializer; ``` ### withdraw diff --git a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md index 1b484436..6e6c6599 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md @@ -1,5 +1,5 @@ # ZetaConnectorNonNative -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/ZetaConnectorNonNative.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/ZetaConnectorNonNative.sol) **Inherits:** [ZetaConnectorBase](/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md) @@ -15,22 +15,24 @@ Max supply for minting. ```solidity -uint256 public maxSupply = type(uint256).max; +uint256 public maxSupply; ``` ## Functions -### constructor +### initialize ```solidity -constructor( +function initialize( address gateway_, address zetaToken_, address tssAddress_, address admin_ ) - ZetaConnectorBase(gateway_, zetaToken_, tssAddress_, admin_); + public + override + initializer; ``` ### setMaxSupply @@ -161,7 +163,7 @@ function receiveTokens(uint256 amount) external override whenNotPaused; ```solidity -function _mintTo(address to, uint256 amount, bytes32 internalSendHash) internal; +function _mintTo(address to, uint256 amount, bytes32 internalSendHash) private; ``` ## Events diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md index 0e62cbc7..a7651f28 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md @@ -1,5 +1,5 @@ # IERC20Custody -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IERC20Custody.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IERC20Custody.sol) **Inherits:** [IERC20CustodyEvents](/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md), [IERC20CustodyErrors](/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md) diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md index 65aa6d6e..232a3a84 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md @@ -1,5 +1,5 @@ # IERC20CustodyErrors -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IERC20Custody.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IERC20Custody.sol) Interface for the errors used in the ERC20 custody contract. diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md index 2433e422..c257a444 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md @@ -1,5 +1,5 @@ # IERC20CustodyEvents -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IERC20Custody.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IERC20Custody.sol) Interface for the events emitted by the ERC20 custody contract. @@ -94,3 +94,18 @@ Emitted in legacy deposit method. event Deposited(bytes recipient, IERC20 indexed asset, uint256 amount, bytes message); ``` +### UpdatedCustodyTSSAddress +Emitted when tss address is updated + + +```solidity +event UpdatedCustodyTSSAddress(address oldTSSAddress, address newTSSAddress); +``` + +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`oldTSSAddress`|`address`|old tss address| +|`newTSSAddress`|`address`|new tss address| + diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.Callable.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.Callable.md index 057b5550..1e824cdf 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.Callable.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.Callable.md @@ -1,5 +1,5 @@ # Callable -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IGatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IGatewayEVM.sol) Interface implemented by contracts receiving authenticated calls. diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md index f72c1a06..4ddfe30e 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md @@ -1,5 +1,5 @@ # IGatewayEVM -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IGatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IGatewayEVM.sol) **Inherits:** [IGatewayEVMErrors](/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md), [IGatewayEVMEvents](/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md) diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md index 1c0aeeda..fd58d203 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md @@ -1,5 +1,5 @@ # IGatewayEVMErrors -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IGatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IGatewayEVM.sol) Interface for the errors used in the GatewayEVM contract. @@ -93,3 +93,11 @@ Error when trying to call onRevert method using arbitrary call. error NotAllowedToCallOnRevert(); ``` +### PayloadSizeExceeded +Error indicating payload size exceeded in external functions. + + +```solidity +error PayloadSizeExceeded(); +``` + diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md index a4a9a3a0..98a45506 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md @@ -1,5 +1,5 @@ # IGatewayEVMEvents -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IGatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IGatewayEVM.sol) Interface for the events emitted by the GatewayEVM contract. @@ -99,3 +99,18 @@ event Called(address indexed sender, address indexed receiver, bytes payload, Re |`payload`|`bytes`|The calldata passed to the call.| |`revertOptions`|`RevertOptions`|Revert options.| +### UpdatedGatewayTSSAddress +Emitted when tss address is updated + + +```solidity +event UpdatedGatewayTSSAddress(address oldTSSAddress, address newTSSAddress); +``` + +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`oldTSSAddress`|`address`|old tss address| +|`newTSSAddress`|`address`|new tss address| + diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/struct.MessageContext.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/struct.MessageContext.md index 13bce47a..8887768b 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/struct.MessageContext.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IGatewayEVM.sol/struct.MessageContext.md @@ -1,5 +1,5 @@ # MessageContext -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IGatewayEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IGatewayEVM.sol) Message context passed to execute function. diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md index 4e75ea4a..00406c47 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md @@ -1,5 +1,5 @@ # IZetaConnectorEvents -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IZetaConnector.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IZetaConnector.sol) Interface for the events emitted by the ZetaConnector contracts. @@ -53,3 +53,18 @@ event WithdrawnAndReverted(address indexed to, uint256 amount, bytes data, Rever |`data`|`bytes`|The calldata passed to the contract call.| |`revertContext`|`RevertContext`|Revert context to pass to onRevert.| +### UpdatedZetaConnectorTSSAddress +Emitted when tss address is updated + + +```solidity +event UpdatedZetaConnectorTSSAddress(address oldTSSAddress, address newTSSAddress); +``` + +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`oldTSSAddress`|`address`|old tss address| +|`newTSSAddress`|`address`|new tss address| + diff --git a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md index ba9b4f53..30fd68c5 100644 --- a/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md +++ b/src/pages/developers/architecture/protocol/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md @@ -1,5 +1,5 @@ # IZetaNonEthNew -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/evm/interfaces/IZetaNonEthNew.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/evm/interfaces/IZetaNonEthNew.sol) **Inherits:** IERC20 diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md b/src/pages/developers/architecture/protocol/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md index 70ffd85c..2db2b1d6 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md @@ -1,5 +1,5 @@ # GatewayZEVM -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/GatewayZEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/GatewayZEVM.sol) **Inherits:** [IGatewayZEVM](/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md), Initializable, AccessControlUpgradeable, UUPSUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable @@ -37,6 +37,15 @@ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); ``` +### MAX_MESSAGE_SIZE +Max size of message + revertOptions revert message. + + +```solidity +uint256 public constant MAX_MESSAGE_SIZE = 1024; +``` + + ## Functions ### onlyProtocol @@ -109,11 +118,11 @@ function unpause() external onlyRole(PAUSER_ROLE); ### _withdrawZRC20 -*Internal function to withdraw ZRC20 tokens.* +*Private function to withdraw ZRC20 tokens.* ```solidity -function _withdrawZRC20(uint256 amount, address zrc20) internal returns (uint256); +function _withdrawZRC20(uint256 amount, address zrc20) private returns (uint256); ``` **Parameters** @@ -131,11 +140,11 @@ function _withdrawZRC20(uint256 amount, address zrc20) internal returns (uint256 ### _withdrawZRC20WithGasLimit -*Internal function to withdraw ZRC20 tokens with gas limit.* +*Private function to withdraw ZRC20 tokens with gas limit.* ```solidity -function _withdrawZRC20WithGasLimit(uint256 amount, address zrc20, uint256 gasLimit) internal returns (uint256); +function _withdrawZRC20WithGasLimit(uint256 amount, address zrc20, uint256 gasLimit) private returns (uint256); ``` **Parameters** @@ -154,11 +163,11 @@ function _withdrawZRC20WithGasLimit(uint256 amount, address zrc20, uint256 gasLi ### _transferZETA -*Internal function to transfer ZETA tokens.* +*Private function to transfer ZETA tokens.* ```solidity -function _transferZETA(uint256 amount, address to) internal; +function _transferZETA(uint256 amount, address to) private; ``` **Parameters** @@ -405,7 +414,7 @@ function _call( CallOptions memory callOptions, RevertOptions memory revertOptions ) - internal; + private; ``` ### deposit @@ -432,7 +441,7 @@ Execute a user-specified contract on ZEVM. ```solidity function execute( - zContext calldata context, + MessageContext calldata context, address zrc20, uint256 amount, address target, @@ -446,7 +455,7 @@ function execute( |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`zrc20`|`address`|The address of the ZRC20 token.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| @@ -460,7 +469,7 @@ Deposit foreign coins into ZRC20 and call a user-specified contract on ZEVM. ```solidity function depositAndCall( - zContext calldata context, + MessageContext calldata context, address zrc20, uint256 amount, address target, @@ -474,7 +483,7 @@ function depositAndCall( |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`zrc20`|`address`|The address of the ZRC20 token.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| @@ -488,7 +497,7 @@ Deposit ZETA and call a user-specified contract on ZEVM. ```solidity function depositAndCall( - zContext calldata context, + MessageContext calldata context, uint256 amount, address target, bytes calldata message @@ -501,7 +510,7 @@ function depositAndCall( |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| |`message`|`bytes`|The calldata to pass to the contract call.| diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/contract.SystemContract.md b/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/contract.SystemContract.md index 240cbdd4..77ed871c 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/contract.SystemContract.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/contract.SystemContract.md @@ -1,5 +1,5 @@ # SystemContract -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/SystemContract.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/SystemContract.sol) **Inherits:** [SystemContractErrors](/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md) diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md b/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md index ee11a49d..6a955b1d 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md @@ -1,5 +1,5 @@ # SystemContractErrors -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/SystemContract.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/SystemContract.sol) *Custom errors for SystemContract* diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/contract.ZRC20.md b/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/contract.ZRC20.md index 028af2aa..3a2ae992 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/contract.ZRC20.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/contract.ZRC20.md @@ -1,5 +1,5 @@ # ZRC20 -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/ZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/ZRC20.sol) **Inherits:** [IZRC20Metadata](/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md), [ZRC20Errors](/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md), [ZRC20Events](/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md) diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md b/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md index 0697b96f..1a854a7a 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md @@ -1,5 +1,5 @@ # ZRC20Errors -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/ZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/ZRC20.sol) *Custom errors for ZRC20* diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md index 30ec1677..63c71e3b 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md @@ -1,5 +1,5 @@ # IGatewayZEVM -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IGatewayZEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IGatewayZEVM.sol) **Inherits:** [IGatewayZEVMErrors](/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md), [IGatewayZEVMEvents](/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md) @@ -244,7 +244,7 @@ Execute a user-specified contract on ZEVM. ```solidity function execute( - zContext calldata context, + MessageContext calldata context, address zrc20, uint256 amount, address target, @@ -256,7 +256,7 @@ function execute( |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`zrc20`|`address`|The address of the ZRC20 token.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| @@ -270,7 +270,7 @@ Deposit foreign coins into ZRC20 and call a user-specified contract on ZEVM. ```solidity function depositAndCall( - zContext calldata context, + MessageContext calldata context, address zrc20, uint256 amount, address target, @@ -282,7 +282,7 @@ function depositAndCall( |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`zrc20`|`address`|The address of the ZRC20 token.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| @@ -295,13 +295,19 @@ Deposit ZETA and call a user-specified contract on ZEVM. ```solidity -function depositAndCall(zContext calldata context, uint256 amount, address target, bytes calldata message) external; +function depositAndCall( + MessageContext calldata context, + uint256 amount, + address target, + bytes calldata message +) + external; ``` **Parameters** |Name|Type|Description| |----|----|-----------| -|`context`|`zContext`|The context of the cross-chain call.| +|`context`|`MessageContext`|The context of the cross-chain call.| |`amount`|`uint256`|The amount of tokens to transfer.| |`target`|`address`|The target contract to call.| |`message`|`bytes`|The calldata to pass to the contract call.| diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md index 3c6a6819..fa2843fd 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md @@ -1,5 +1,5 @@ # IGatewayZEVMErrors -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IGatewayZEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IGatewayZEVM.sol) Interface for the errors used in the GatewayZEVM contract. @@ -93,11 +93,19 @@ Error indicating that only WZETA or the protocol address can call the function. error OnlyWZETAOrProtocol(); ``` -### EmptyMessage -Error indicating call method received empty message as argument. +### InsufficientGasLimit +Error indicating an insufficient gas limit. ```solidity -error EmptyMessage(); +error InsufficientGasLimit(); +``` + +### MessageSizeExceeded +Error indicating message size exceeded in external functions. + + +```solidity +error MessageSizeExceeded(); ``` diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md index aa9bf0e0..fe18b9c8 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md @@ -1,5 +1,5 @@ # IGatewayZEVMEvents -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IGatewayZEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IGatewayZEVM.sol) Interface for the events emitted by the GatewayZEVM contract. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/struct.CallOptions.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/struct.CallOptions.md index ee90dcd7..f7e902bd 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/struct.CallOptions.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IGatewayZEVM.sol/struct.CallOptions.md @@ -1,5 +1,5 @@ # CallOptions -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IGatewayZEVM.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IGatewayZEVM.sol) CallOptions struct passed to call and withdrawAndCall functions. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md index bc60fa8f..b4a78876 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md @@ -1,5 +1,5 @@ # ISystem -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/ISystem.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/ISystem.sol) Interface for the System contract. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md index 698ca481..4be5a239 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md @@ -1,5 +1,5 @@ # IWETH9 -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IWZETA.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IWZETA.sol) Interface for the Weth9 contract. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md index 0020dfc6..7526f3af 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md @@ -1,5 +1,5 @@ # CoinType -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IZRC20.sol) *Coin types for ZRC20. Zeta value should not be used.* diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md index d37b0c16..a8331d21 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md @@ -1,5 +1,5 @@ # IZRC20 -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IZRC20.sol) Interface for the ZRC20 token contract. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md index f503d704..c9cb6041 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md @@ -1,5 +1,5 @@ # IZRC20Metadata -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IZRC20.sol) **Inherits:** [IZRC20](/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md) diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md index fc49e913..2eee7db9 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md @@ -1,5 +1,5 @@ # ZRC20Events -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/IZRC20.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/IZRC20.sol) Interface for the ZRC20 events. diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/README.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/README.md index 27c982d5..ef978911 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/README.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/README.md @@ -13,4 +13,5 @@ - [CoinType](IZRC20.sol/enum.CoinType.md) - [zContext](UniversalContract.sol/struct.zContext.md) - [zContract](UniversalContract.sol/interface.zContract.md) +- [MessageContext](UniversalContract.sol/struct.MessageContext.md) - [UniversalContract](UniversalContract.sol/interface.UniversalContract.md) diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md index 900df737..5d314c9a 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md @@ -1,12 +1,12 @@ # UniversalContract -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/UniversalContract.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/UniversalContract.sol) ## Functions -### onCrossChainCall +### onCall ```solidity -function onCrossChainCall(zContext calldata context, address zrc20, uint256 amount, bytes calldata message) external; +function onCall(MessageContext calldata context, address zrc20, uint256 amount, bytes calldata message) external; ``` diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md index 3aa62bb9..3c50075c 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md @@ -1,5 +1,5 @@ # zContract -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/UniversalContract.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/UniversalContract.sol) ## Functions diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md new file mode 100644 index 00000000..9635bb52 --- /dev/null +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md @@ -0,0 +1,12 @@ +# MessageContext +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/UniversalContract.sol) + + +```solidity +struct MessageContext { + bytes origin; + address sender; + uint256 chainID; +} +``` + diff --git a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md index f15fa3b7..dc54ab90 100644 --- a/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md +++ b/src/pages/developers/architecture/protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md @@ -1,5 +1,5 @@ # zContext -[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/3a274ce7bad045a879c73669586611d35509cbce/contracts/zevm/interfaces/UniversalContract.sol) +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/317e9a168aa19dc31b1217eef2a50dbf71ae4d80/contracts/zevm/interfaces/UniversalContract.sol) ```solidity diff --git a/src/pages/developers/architecture/protocol/index.md b/src/pages/developers/architecture/protocol/index.md index fa2538bd..e2071878 100644 --- a/src/pages/developers/architecture/protocol/index.md +++ b/src/pages/developers/architecture/protocol/index.md @@ -98,6 +98,7 @@ $ cast --help - [CoinType](protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md) - [zContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md) - [zContract](protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md) + - [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md) - [UniversalContract](protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md) - [GatewayZEVM](protocol/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md) - [SystemContractErrors](protocol/contracts/zevm/SystemContract.sol/interface.SystemContractErrors.md)