βοΈSmart contract
In this section, we'll look at how to create a smart-contract using Solidity, which will enable the use of mirrors wallets.
The mirror structure (web3 link)
Structure example:
/// @notice User storage structure
struct User {
/// @notice mirror address used to sign txns
address internalAddress;
// additional extra data can be stored too
/// @notice example counter for games played by this user
uint gamesPlayed;
/// @notice amount of token loaded inside the game contract
uint tokenAvailable;
}Mapping examples:
Modifier example:
Registration function example:
Last updated