Skip to content

Instantly share code, notes, and snippets.

View aesthezel's full-sized avatar
🐢
Watching and learning

David Pino aesthezel

🐢
Watching and learning
View GitHub Profile
@aesthezel
aesthezel / EntityDNA.sol
Created May 26, 2023 15:31
Entity DNA storage
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
contract EntityDNA is Ownable
{
@aesthezel
aesthezel / Crowdfunding.sol
Created April 21, 2022 18:20
A crowdfunding smart contract example
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract CrowdFunding
{
uint private projectIdCounter;
struct Contribution
{
@aesthezel
aesthezel / InvertNumber.cs
Created April 10, 2022 22:52
Inverting the order of integers
public static int InvertNumber(int number)
{
int counter = 0;
int control = 1;
while(control <= number)
{
control *= 10;
counter++;
}
@aesthezel
aesthezel / MasterButton.cs
Created May 21, 2021 13:20
A Unity UI Button performing another buttons with click on it
using UnityEngine;
using UnityEngine.UI;
public class MasterButton : MonoBehaviour
{
public Button primaryButton;
public Button[] targetButtons;
void Start()
{
@aesthezel
aesthezel / ButtonAction.cs
Last active January 24, 2021 14:33
A event and delegate button with OnClick via code on Unity
using UnityEngine.UI;
public class ButtonAction
{
public delegate void PutAction(ButtonAction button, string condition);
public event PutAction Actioned;
private string state;
private Button button;
private int amount;