infrastructure-upgrade/lib/v3-periphery/contracts/test/Base64Test.sol
T-Hax 735546619e
init
Signed-off-by: T-Hax <>
2023-04-08 18:46:18 +00:00

17 lines
440 B
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.7.6;
import 'base64-sol/base64.sol';
contract Base64Test {
function encode(bytes memory data) external pure returns (string memory) {
return Base64.encode(data);
}
function getGasCostOfEncode(bytes memory data) external view returns (uint256) {
uint256 gasBefore = gasleft();
Base64.encode(data);
return gasBefore - gasleft();
}
}