Skip to content

Instantly share code, notes, and snippets.

@Robetot
Robetot / NftContract...AdminFunctionsLib.sol
Created January 19, 2026 17:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.20+commit.a1b79de6.js&optimize=true&runs=100&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "./Structs.sol";
import "./Enums.sol";
import "./Errors.sol";
import "./Interfaces.sol";
/**
* @title AdminFunctionsLib
@Robetot
Robetot / MemoryMint_Verify_CLEAN...1_Interfaces.sol
Created December 27, 2025 22:01
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.33+commit.64118f21.js&optimize=true&runs=200&gist=
// 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,
@Robetot
Robetot / ArraysExercise.sol
Created November 10, 2025 23:40
Solidity ArraysExercise Contract
// 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
@Robetot
Robetot / BasicMath.sol
Created November 8, 2025 04:58
BasicMath contract with adder and subtractor functions for Base Learn exercise
// 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);