Skip to content

Instantly share code, notes, and snippets.

View alexreyes's full-sized avatar
😱

Alex Reyes alexreyes

😱
View GitHub Profile
@alexreyes
alexreyes / ensExpiry.js
Created August 16, 2022 05:53
Get ENS expiry for a given address
const { ethers, BigNumber } = require("ethers");
const provider = new ethers.providers.AlchemyProvider('homestead', '_gNU-Y2xjUgiSuMx2tr87F-wZ12ybjrh');
async function getExpiryDate(address) {
const ens = await provider.lookupAddress(address);
if (ens === null) {
console.log('No ENS found for this address');
return;

1: Write & deploy your first NFT smart contract

Learn to write an NFT smart contract on Celo!

Introduction

In this tutorial, we will create and deploy an NFT smart contract on the Celo network. Since Celo is a close cousin to Ethereum, it inherits Ethereum’s developer ecosystem and tooling.

Part of what Celo inherits is the ERC-721 standard for NFTs. We will be writing and deploying a simple NFT smart contract to the Alfajores testnet using Solidity, Datahub and Truffle.

After finishing this tutorial, we will have an NFT smart contract we can keep building on. The possibilities are endless for NFTs, so this will serve as an introduction to get you started.

0x0Edc14e239E84Ec62f796318Cd81d515b5dCe8d4

Keybase proof

I hereby claim:

  • I am alexreyes on github.
  • I am alexreyes (https://keybase.io/alexreyes) on keybase.
  • I have a public key whose fingerprint is E6E5 1242 337C 1D25 C904 4AA3 C5AD C313 E7DD 892A

To claim this, I am signing this object:

@alexreyes
alexreyes / Index.html
Created April 2, 2020 00:28
perma-quarantine-notes build index file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Svelte app</title>
<link rel='icon' type='image/png' href='favicon.png'>
<link rel='stylesheet' href='global.css'>
@alexreyes
alexreyes / islands.py
Created December 9, 2019 16:15
Solution for number of islands problem on leetcode: https://leetcode.com/problems/number-of-islands/
class Solution(object):
def numIslands(self, grid):
if (not grid):
return 0
rowLen = len(grid)
columnLen = len(grid[0])
islandCount = 0
@alexreyes
alexreyes / cracklePop.py
Created December 9, 2019 16:13
Crackle pop for recurse center
def cracklePop():
for i in range(1,101):
if i % 3 == 0 and i % 5 == 0:
print("CracklePop")
elif i % 3 == 0:
print("Crackle")
elif i % 5 == 0:
print("Pop")
else:
print(i)
public class MainActivity extends AppCompatActivity {
TextView text = (TextView) findViewById(R.id.text);
private void loadWeather(String zipCode) {
String apiUrl = "http://api.openweathermap.org/data/2.5/forecast/city?id=" + zipCode + "&APPID=780f5669dd2bbeb78315e948dbf8d99b";
RequestQueue mRequestQueue;
// Instantiate the cache
Cache cache = new DiskBasedCache(getCacheDir(), 1024 * 1024);