seaport
seaport copied to clipboard
fix: optimize pad to Reduce Gas Costs
Motivation
The pad function was using while and string.concat, which are not the most gas-efficient ways to handle string padding in Solidity. Since string operations are expensive, this approach led to unnecessary gas consumption.
Solution
Replaced while and string.concat with abi.encodePacked, reducing redundant concatenations. This improves gas efficiency while maintaining the same functionality.