Created
April 8, 2024 04:12
-
-
Save mingderwang/d5591572b0a470bf71ff6869ad72bfc8 to your computer and use it in GitHub Desktop.
from chatGPT
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
pragma solidity ^0.8.0; | |
contract ExampleContract { | |
struct PassKeyId { | |
uint256 pubKeyX; | |
uint256 pubKeyY; | |
string keyId; | |
} | |
// You can declare a variable of type PassKeyId | |
PassKeyId public passKey; | |
// Example function to set passKey values | |
function setPassKey(uint256 _pubKeyX, uint256 _pubKeyY, string memory _keyId) public { | |
passKey = PassKeyId(_pubKeyX, _pubKeyY, _keyId); | |
} | |
// Example function to get passKey values | |
function getPassKey() public view returns (uint256, uint256, string memory) { | |
return (passKey.pubKeyX, passKey.pubKeyY, passKey.keyId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment