Skip to content

Instantly share code, notes, and snippets.

@mhluongo
mhluongo / tip-088.md
Last active September 23, 2024 02:22
TIP-088: Aave 🤝 Threshold

TIP-088: Aave 🤝 Threshold

Today, tBTC was listed on Aave, the leading lending platform across DeFi.

Aave on DeFiLlama

... as well as the largest single venue for lending WBTC — making Aave the largest decentralized BTC lending platform in production.

Screenshot from 2024-09-22 20-37-33

Verify Github on Galxe. gid:6QTfuzjMGLFPf48odykKgk

0x059c21e080e00802736c0b5518acd7184b4ebdb99f475fc7e3898677d7c6fa2a

@mhluongo
mhluongo / ApprovalTarget.sol
Last active May 21, 2023 18:28
Tally ApprovalTarget
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./IApprovalTarget.sol";
import "./EIP712Helper.sol";
/// @notice ApprovalTarget is an immutable contract that accepts token approvals
Verifying that "mhluongo.id" is my Blockstack ID. https://onename.com/mhluongo
Verifying that +mhluongo is my Bitcoin username. You can send me #bitcoin here: https://onename.io/mhluongo
@mhluongo
mhluongo / keybase.md
Created May 19, 2014 17:36
keybase.md

Keybase proof

I hereby claim:

  • I am mhluongo on github.
  • I am mhluongo (https://keybase.io/mhluongo) on keybase.
  • I have a public key whose fingerprint is 4821 DDEA 0EBC 82D4 1FF6 4494 4E70 50F4 BBE7 9624

To claim this, I am signing this object:

@mhluongo
mhluongo / api.py
Last active December 18, 2015 13:19
A quick example using neo4django with tastypie adapted from the tastypie tutorial (http://django-tastypie.readthedocs.org/en/latest/tutorial.html).
from tastypie.resources import ModelResource
from .models import Entry
class EntryResource(ModelResource):
class Meta:
queryset = Entry.objects.all()
resource_name = 'entry'
@mhluongo
mhluongo / example
Last active December 17, 2015 19:59
Some relationship magic to make modeling easier for situations where you want to aggregate across multiple rel-types in one relationship field. This is a very not-supported / non-standard approach, and could be broken in future versions of neo4django.
>>> from .models import Family, Person
>>>
>>> family_1 = Family.objects.create(status='married')
>>> family_2 = Family.objects.create()
>>>
>>> pete = Person.objects.create(name='Pete')
>>> mary = Person.objects.create(name='Mary')
>>>
>>> family_1.spouses.add(pete, mary)
>>> family_2.children.add(pete)
import neo4django
from neo4django.db import models
class Preceding(models.NodeModel):
precedes_events = models.Relationship('Event', rel_type=neo4django.Outgoing.PRECEDES_EVENT,
related_name='preceded_by')
precedes_conditions = models.Relationship('Condition', rel_type=neo4django.Outgoing.PRECEDES_CONDITION,
related_name='preceded_by')
class Event(Preceding):