Created
December 2, 2023 08:11
-
-
Save sodexx7/43d4b778b94bc46f51ea681c4ac556d7 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=builtin&optimize=false&runs=200&gist=
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.23; | |
contract TestArrayInDifferentSituations { | |
// function testMemory(uint[] memory array,uint[] memory array2) pure external returns (uint[] memory result){ | |
// return array; | |
// } | |
// function testCalldata(uint[] calldata array) pure external returns (uint[] memory result){ | |
// return array; | |
// } | |
// function testMemory(uint[] memory array) pure external returns (uint[] memory result){ | |
// return array; | |
// } | |
function convertStringToBytes(string memory param) external returns(bytes memory result) { | |
// return abi.encodePac (param); | |
return abi.encodePacked(param); | |
} | |
function testBytes(bytes calldata param) pure external returns (bytes calldata result){ | |
return param; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment