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.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; |
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.31; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| contract OwnToken is ERC20 { | |
| constructor(uint256 initialSupply) ERC20("RomeoEnso", "RE") { | |
| _mint(msg.sender, initialSupply * 10 ** decimals()); |
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.31; | |
| import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | |
| contract ConvertETHtoPHP { | |
| AggregatorV3Interface internal priceFeed; | |
| uint256 public constant USD_TO_PHP_RATE = 56; |
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
| <!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; |
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.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. | |
| */ |
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.31; | |
| contract Bank { | |
| /** | |
| ACTIVITY 1 — First Payable Function | |
| Instructions: | |
| Create a mapping: | |
| mapping(address => uint) public balances; | |
| Create a payable function deposit() that: |
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.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. |
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.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. |
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.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” |
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.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; | |
| } | |
NewerOlder