Skip to content

Instantly share code, notes, and snippets.

View jatubio's full-sized avatar

Juan Antonio Tubio jatubio

View GitHub Profile
javascript:document.body.innerHTML='
<h1>Right-click Link Below To Open In Incognito Window</h1>
<img src="https://www.technojudo.com/wp-content/uploads/2019/03/Right-click-For-Incognito.jpg" alt="Right-click Link For Incognito Window">
<br>
<p><a href='+location.href+'>'+location.href+'</a></p>
<img src="http://technoju.do/3MAhv">
<p style="font-size:11px">&#169; 2019 Paul Luckett, <a href="http://technoju.do/4Nspl">TechnoJudo.com</a></p>';
@jatubio
jatubio / water.sol
Created September 17, 2022 07:42
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
//import Open Zepplins ERC-20 contract
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
//create a sample token that inherits Open Zepplins ERC-20 contract
contract WATER is ERC20 {
uint public amountAllowed = 1000000000000000000;
@jatubio
jatubio / nftutils.py
Created July 25, 2024 13:06
Python class used to check balance of a NFT token on a wallet
from web3 import Web3
class NFTUtils:
def __init__(self, w3, contract_address):
self.w3 = w3
self.contract_address = self.w3.to_checksum_address(contract_address)
# La usamos con una ABI simple para comprobar si admite unos parámetro o no
# Y así detectamos el tipo de contrato
def _call_simple_function(self, function_name, *args):