Skip to content

Instantly share code, notes, and snippets.

@0xCLARITY
0xCLARITY / index.ts
Created March 18, 2024 19:37
Simulate LDA Royalty Claiming
import { encodeFunctionData } from "viem";
import { decodeEventLog } from "viem";
import { numberToHex, bytesToHex, hexToBytes } from "viem";
// This is The ABI for the Royalties contract used for Payouts
import abi from "./royalties";
// Wallet address here is an example - but royalties contract is the actual address.
const walletAddress = "0x0bc119a37d1d2817f4f2721b282a548018ecb980";
const royaltiesContract = "0xfe16ee78828672e86cf8e42d8a5119ab79877ec7";
@0xCLARITY
0xCLARITY / payid-2.0-thoughts.md
Last active October 8, 2020 09:17
PayID 2.0 Thoughts

PayID 2.0 Thoughts

The High-Level Problem:

Even though PayID is an incredibly simple protocol, some of the design decisions make it hard to host a PayID payload as a static file in a way that follows the protocol. Most of the problems stem from the use of headers, which a static JSON file cannot set. We should revisit those design decisions to see if we can iterate PayID to a place where it’s easy to use static files.

Problem #1: PayID Versioning

Currently, PayID Versioning happens at a few places:

@0xCLARITY
0xCLARITY / payid-weights.json
Created August 26, 2020 15:12
PayID Weights
{
"payId": "hansbergren$xpring.money",
"addresses": [
{
"paymentNetwork": "XRPL",
"environment": "MAINNET",
"addressDetailsType": "CryptoAddressDetails",
"addressDetails": {
"address": "rppYSk6LCTWPNXKJgPedaRDad38HSGVkeD",
},
@0xCLARITY
0xCLARITY / keybase.md
Created January 2, 2020 20:18
Keybase Proof

Keybase proof

I hereby claim:

  • I am hbergren on github.
  • I am hbergren (https://keybase.io/hbergren) on keybase.
  • I have a public key ASBDqYy5yyVt-l84PKKWuyqNGm--b1eqX3uAYW_c2-fRiQo

To claim this, I am signing this object: