Skip to content

Instantly share code, notes, and snippets.

View renso3x's full-sized avatar
🎯
Focusing

Renso3x renso3x

🎯
Focusing
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFTToken is ERC721, Ownable {
uint256 public nextTokenId;
uint256 public constant MAX_SUPPLY = 5;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract OwnToken is ERC20 {
constructor(uint256 initialSupply) ERC20("RomeoEnso", "RE") {
_mint(msg.sender, initialSupply * 10 ** decimals());
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract ConvertETHtoPHP {
AggregatorV3Interface internal priceFeed;
uint256 public constant USD_TO_PHP_RATE = 56;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IPFS Resume Upload</title>
<style>
:root {
--bg: #0f172a;
--bg-soft: #020617;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
/**
Activity 1: Caller and Receiver Contracts
Instructions
Create two contracts
The first contract should serve as a caller
The second contract should contain the function to compute sum, difference, products and quotient of two numbers that will come from the caller.
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
contract Bank {
/**
ACTIVITY 1 — First Payable Function
Instructions:
Create a mapping:
mapping(address => uint) public balances;
Create a payable function deposit() that:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
contract SimpleLogger {
/**
Activity 1
Instructions:
Declare an event ActionPerformed(address user, string action).
Create a function logAction(string memory _action) that:
Emits the event with msg.sender and the _action text.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
contract Activity_5 {
/**
Activity 1
Create a fixed-size array of length 3 called favoriteNumbers.
Add a function setNumber(uint index, uint value) that updates a number at a given index.
Add another function getNumber(uint index) that returns the value at that index.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
contract Activity_4 {
/**
Temperature Checker
Make a function that will tell if the temperature is freezing point or boiling point.
Grade Evaluator
Make a function that will return a grade based on a score.
90 and above → “A”
@renso3x
renso3x / Activity_3.sol
Created March 4, 2026 03:40
Activity Three
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.31;
contract Activity_3 {
// Celsius to Fahrenheit Converter - Make a function that will convert Celsius to Fahrenheit.
function celsiusToFahrenheit(uint celsius) public pure returns (uint256) {
return (celsius * 9/5) + 32;
}