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.20; | |
| import "./Structs.sol"; | |
| import "./Enums.sol"; | |
| import "./Errors.sol"; | |
| import "./Interfaces.sol"; | |
| /** | |
| * @title AdminFunctionsLib |
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.20; | |
| /** | |
| * @title IERC721Receiver | |
| * @notice Interface for safe ERC-721 token transfers | |
| */ | |
| interface IERC721Receiver { | |
| function onERC721Received( | |
| address operator, |
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.30; | |
| contract ArraysExercise { | |
| // Declare state variables to store arrays of numbers, timestamps, and senders | |
| uint[] numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // Array of numbers initialized with values | |
| uint[] timestamps; // Dynamic array to store timestamps | |
| address[] senders; // Dynamic array to store sender addresses | |
| uint256 constant Y2K = 946702800; // Constant representing the Unix timestamp for the year 2000 |
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: UNLICENSED | |
| pragma solidity ^0.8.17; | |
| contract BasicMath { | |
| function adder(uint _a, uint _b) public pure returns (uint sum, bool error) { | |
| unchecked { | |
| sum = _a + _b; | |
| if (sum < _a) { // overflow check | |
| return (0, true); |