Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Added max payload size check" #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions contracts/RelayerV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ contract RelayerV2 is ReentrancyGuard, OwnableUpgradeable, Proxied, ILayerZeroRe
}

function getFee(uint16 _dstChainId, uint16 _outboundProofType, address _userApplication, uint _payloadSize, bytes calldata _adapterParams) external view override returns (uint) {
require(_payloadSize <= 10000, "Relayer: _payloadSize tooooo big");
(uint basePrice, uint pricePerByte) = _getPrices(_dstChainId, _outboundProofType, _userApplication, _adapterParams);
return basePrice.add(_payloadSize.mul(pricePerByte));
}
Expand All @@ -148,7 +147,6 @@ contract RelayerV2 is ReentrancyGuard, OwnableUpgradeable, Proxied, ILayerZeroRe

function assignJob(uint16 _dstChainId, uint16 _outboundProofType, address _userApplication, uint _payloadSize, bytes calldata _adapterParams) external override returns (uint) {
require(msg.sender == address(uln), "Relayer: invalid uln");
require(_payloadSize <= 10000, "Relayer: _payloadSize tooooo big");
(uint basePrice, uint pricePerByte) = _getPrices(_dstChainId, _outboundProofType, _userApplication, _adapterParams);
uint totalFee = basePrice.add(_payloadSize.mul(pricePerByte));
emit AssignJob(totalFee);
Expand Down