From 4952436b694895f64410b295da07dd876fee321d Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 18 Dec 2024 11:28:46 +0300 Subject: [PATCH] fix: add setGasLimit --- contracts/nft/contracts/evm/UniversalNFT.sol | 5 +++++ contracts/nft/contracts/zetachain/UniversalNFT.sol | 5 +++++ contracts/token/contracts/evm/UniversalToken.sol | 5 +++++ contracts/token/contracts/zetachain/UniversalToken.sol | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/contracts/nft/contracts/evm/UniversalNFT.sol b/contracts/nft/contracts/evm/UniversalNFT.sol index 6f68cae..aaf6b6f 100644 --- a/contracts/nft/contracts/evm/UniversalNFT.sol +++ b/contracts/nft/contracts/evm/UniversalNFT.sol @@ -62,6 +62,11 @@ contract UniversalNFT is gateway = GatewayEVM(gatewayAddress); } + function setGasLimit(uint256 gas) external onlyOwner { + if (gas <= 0) revert InvalidGasLimit(); + gasLimitAmount = gas; + } + function setUniversal(address contractAddress) external onlyOwner { if (contractAddress == address(0)) revert InvalidAddress(); universal = contractAddress; diff --git a/contracts/nft/contracts/zetachain/UniversalNFT.sol b/contracts/nft/contracts/zetachain/UniversalNFT.sol index de0ba5e..b0f6669 100644 --- a/contracts/nft/contracts/zetachain/UniversalNFT.sol +++ b/contracts/nft/contracts/zetachain/UniversalNFT.sol @@ -75,6 +75,11 @@ contract UniversalNFT is gasLimitAmount = gas; } + function setGasLimit(uint256 gas) external onlyOwner { + if (gas <= 0) revert InvalidGasLimit(); + gasLimitAmount = gas; + } + function setConnected( address zrc20, address contractAddress diff --git a/contracts/token/contracts/evm/UniversalToken.sol b/contracts/token/contracts/evm/UniversalToken.sol index 348499c..601d27a 100644 --- a/contracts/token/contracts/evm/UniversalToken.sol +++ b/contracts/token/contracts/evm/UniversalToken.sol @@ -51,6 +51,11 @@ contract UniversalToken is gateway = GatewayEVM(gatewayAddress); } + function setGasLimit(uint256 gas) external onlyOwner { + if (gas <= 0) revert InvalidGasLimit(); + gasLimitAmount = gas; + } + function setUniversal(address contractAddress) external onlyOwner { if (contractAddress == address(0)) revert InvalidAddress(); universal = contractAddress; diff --git a/contracts/token/contracts/zetachain/UniversalToken.sol b/contracts/token/contracts/zetachain/UniversalToken.sol index 0868549..a6c7495 100644 --- a/contracts/token/contracts/zetachain/UniversalToken.sol +++ b/contracts/token/contracts/zetachain/UniversalToken.sol @@ -66,6 +66,11 @@ contract UniversalToken is gasLimitAmount = gas; } + function setGasLimit(uint256 gas) external onlyOwner { + if (gas <= 0) revert InvalidGasLimit(); + gasLimitAmount = gas; + } + function setConnected( address zrc20, address contractAddress