Skip to content

Commit

Permalink
gasLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Jan 6, 2025
1 parent 27e8749 commit a04ac5c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
12 changes: 7 additions & 5 deletions contracts/nft/contracts/evm/UniversalNFTCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ abstract contract UniversalNFTCore is
// Address of the EVM gateway contract
GatewayEVM public gateway;

// The address of the Universal NFT contract on ZetaChain. This contract serves as a key component for handling all cross-chain transfers while also functioning as an ERC-721 Universal NFT.
// The address of the Universal NFT contract on ZetaChain. This contract serves
// as a key component for handling all cross-chain transfers while also functioning
// as an ERC-721 Universal NFT.
address public universal;

// The amount of gas used when making cross-chain transfers
Expand Down Expand Up @@ -77,19 +79,19 @@ abstract contract UniversalNFTCore is
* @dev To be called during contract deployment.
* @param gatewayAddress The address of the gateway contract.
* @param universalAddress The address of the universal contract.
* @param gas The gas limit to set.
* @param gasLimit The gas limit to set.
*/
function __UniversalNFTCore_init(
address gatewayAddress,
address universalAddress,
uint256 gas
uint256 gasLimit
) internal {
if (gatewayAddress == address(0)) revert InvalidAddress();
if (universalAddress == address(0)) revert InvalidAddress();
if (gas == 0) revert InvalidGasLimit();
if (gasLimit == 0) revert InvalidGasLimit();
gateway = GatewayEVM(gatewayAddress);
universal = universalAddress;
gasLimitAmount = gas;
gasLimitAmount = gasLimit;
}

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning


/**
Expand Down
10 changes: 5 additions & 5 deletions contracts/nft/contracts/zetachain/UniversalNFTCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract contract UniversalNFTCore is
}

/**
* @notice Sets the EVM gateway contract address.
* @notice Sets the ZetaChain gateway contract address.
* @dev Can only be called by the contract owner.
* @param gatewayAddress The address of the gateway contract.
*/
Expand All @@ -67,20 +67,20 @@ abstract contract UniversalNFTCore is
* @notice Initializes the contract.
* @dev Should be called during contract deployment.
* @param gatewayAddress Address of the Gateway contract.
* @param gas Gas limit for cross-chain calls.
* @param gasLimit Gas limit for cross-chain calls.
* @param uniswapRouterAddress Address of the Uniswap router contract.
*/
function __UniversalNFTCore_init(
address gatewayAddress,
uint256 gas,
uint256 gasLimit,
address uniswapRouterAddress
) internal {
if (gatewayAddress == address(0) || uniswapRouterAddress == address(0))
revert InvalidAddress();
if (gas == 0) revert InvalidGasLimit();
if (gasLimit == 0) revert InvalidGasLimit();
gateway = GatewayZEVM(payable(gatewayAddress));
uniswapRouter = uniswapRouterAddress;
gasLimitAmount = gas;
gasLimitAmount = gasLimit;
}

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning


/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/token/contracts/evm/UniversalTokenCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ abstract contract UniversalTokenCore is
* @dev To be called during contract deployment.
* @param gatewayAddress The address of the gateway contract.
* @param universalAddress The address of the universal contract.
* @param gas The gas limit to set.
* @param gasLimit The gas limit to set.
*/
function __UniversalTokenCore_init(
address gatewayAddress,
address universalAddress,
uint256 gas
uint256 gasLimit
) internal {
if (gatewayAddress == address(0)) revert InvalidAddress();
if (universalAddress == address(0)) revert InvalidAddress();
if (gas == 0) revert InvalidGasLimit();
if (gasLimit == 0) revert InvalidGasLimit();
gateway = GatewayEVM(gatewayAddress);
universal = universalAddress;
gasLimitAmount = gas;
gasLimitAmount = gasLimit;
}

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning


/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/token/contracts/zetachain/UniversalTokenCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@ abstract contract UniversalTokenCore is
* @notice Initializes the contract.
* @dev Should be called during contract deployment.
* @param gatewayAddress Address of the Gateway contract.
* @param gas Gas limit for cross-chain calls.
* @param gasLimit Gas limit for cross-chain calls.
* @param uniswapRouterAddress Address of the Uniswap router contract.
*/
function __UniversalTokenCore_init(
address gatewayAddress,
uint256 gas,
uint256 gasLimit,
address uniswapRouterAddress
) internal {
if (gatewayAddress == address(0) || uniswapRouterAddress == address(0))
revert InvalidAddress();
if (gas == 0) revert InvalidGasLimit();
if (gasLimit == 0) revert InvalidGasLimit();
gateway = GatewayZEVM(payable(gatewayAddress));
uniswapRouter = uniswapRouterAddress;
gasLimitAmount = gas;
gasLimitAmount = gasLimit;
}

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning


/**
Expand Down

0 comments on commit a04ac5c

Please sign in to comment.