Last active
August 4, 2022 13:02
-
-
Save devlongs/f56bee8c8d8f7a91839851af528a842b to your computer and use it in GitHub Desktop.
A snippet showing how tuple works in solidity.
This file contains hidden or 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.0; | |
contract Tuple { | |
function getValues() public pure returns (int, bool) { | |
return (49, true); | |
} | |
function get() public pure returns (int) { | |
(int age, ) = getValues(); | |
return age; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment