Skip to content

Lesson 2: "SimpleStorage" vs "simpleStorage" #5447

Answered by Nlferu
oceanwillo asked this question in Q&A
Discussion options

You must be logged in to vote

@oceanwillo Yes, it is working for objects like contracts or even structs etc.

Some example of struct object:

    struct Certificate {
        string s_tokenIdToURI;
        address s_tokenIdToBorrower;
        uint256 s_tokenIdToBorrowStart;
        uint256 s_tokenIdToBorrowFinish;
    }
 mapping(uint256 => Certificate) private certs;

 function mintNFT() external {
        Certificate storage cert = certs[newTokenId];
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@oceanwillo
Comment options

@Nlferu
Comment options

Answer selected by oceanwillo
@oceanwillo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants