Skip to content

Instantly share code, notes, and snippets.

View bogdan's full-sized avatar
💭
Developing everything, fixing everything, delivering everything

Bogdan Gusiev bogdan

💭
Developing everything, fixing everything, delivering everything
View GitHub Profile
ExifTool Version Number : 13.00
File Name : sunrise.png
Directory : tmp
File Size : 12 MB
File Modification Date/Time : 2024:12:07 17:37:18+01:00
File Access Date/Time : 2024:12:08 17:24:33+01:00
File Inode Change Date/Time : 2024:12:08 12:55:19+01:00
File Permissions : -rw-r--r--
File Type : PNG
File Type Extension : png
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
library IpfsCid {
bytes internal constant BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
/// @notice Converts a CID string to a `bytes32` hash.
/// @param cidString The Base32-encoded CID string (e.g., "bafy...").
/// @return hash The `bytes32` representation of the multihash digest.
function cidToHash(string memory cidString) internal pure returns (bytes32) {
@bogdan
bogdan / bm.rb
Created September 19, 2024 10:23
require "bundler/inline"
require 'benchmark'
gemfile(true) do
source "https://rubygems.org/"
gem "ostruct"
gem "rails"
gem "sqlite3"
import fetch from "isomorphic-unfetch";

const translateToSQL = async (query, apiKey, tableSchema = "") => {

 // Validate inputs
 if (!query || !apiKey) {
   throw new Error("Missing query or API key.");
 }
Timing is on.
id | atxuid | hash | events
Timing is on.
id | created_at | updated_at | user_id | ownership_pending | owner_address | name | parent_id | node | resolver | resolution | registry_type | recent_event_id | reverse | logical_owner_address | tld_id | expires_at | token_type | permissions_bitmask | controller_address | primary_registry
---------+----------------------------+----------------------------+---------+-------------------+---------------+------+-----------+--------------------------------------------------------------------+----------+------------+---------------+-----------------+---------+-----------------------+--------+------------+------------+---------------------+--------------------+------------------
1188769 | 2020-03-24 17:27:08.019717 | 2020-11-20 15:27:42.739649 | | f | | . | | 0x0000000000000000000000000000000000000000000000000000000000000000 | | {} |
Recover your ZNS domains.
UI File: Zilliqa.json
Frontend: => zilliqa address
Backend: Get all domains where logical owner is zilliqa address
UI: Display all domains (no pagination needed)
Timing is on.
owner_address | registry_type | count
--------------------------------------------+---------------+-------
0x000000000000000000000000000000000000dead | UnsMatic | 22580
0x43f62b887b6ef682de8e91024ea38c435802cab8 | Zns | 19140
0xee89375f8eb351fe4cdb26f20d6c418808e323ff | Cns | 15271
0x3945e7c580a3f46c861d700374862e11af67904a | UnsMatic | 15265
0x822983f31b7ead51b6621893508dbec7db5e991c | UnsMatic | 12324
0x85c084c89b2f506541e3e0c7c0989b45749a3502 | UnsMatic | 12153
0xee89375f8eb351fe4cdb26f20d6c418808e323ff | UnsMatic | 12041
Timing is on.
type | status | name | count | min_created | max_created | ?column?
---------------------------+-----------+-----------------------+-------+----------------------------+----------------------------+----------
DomainUpdateRecordsAction | Completed | ud-registrar-platform | 2688 | 2023-03-27 17:08:07.694092 | 2023-05-10 12:56:32.495089 | 1
DomainUpdateRecordsAction | Failed | ud-registrar-platform | 29 | 2023-05-04 08:29:31.495927 | 2023-05-08 13:13:33.73852 | 1
DomainTransferAction | Completed | ud-registrar-platform | 20 | 2023-03-29 20:05:12.753704 | 2023-05-02 14:51:08.569825 | 1
DomainReturnAction | Completed | ud-registrar-platform | 4 | 2023-04-27 17:44:25.35256 | 2023-05-03 02:06:24.119659 | 1
DomainIssueAction | Completed | ud-registrar-platform | 6 | 2023-02-25 02:51:31.032308 | 2023-04-20 23:23:46.287672 | 1
(5 rows)
Timing is on.
type | group | address | cached_balance
--------------+-------------------+--------------------------------------------+-------------------------
MaticAccount | Faucet | 0x18d83aae8f6271c1d2a6195790aa5ce79dbaf7e9 | 15614596466430933110775
EthAccount | Faucet | 0xe61a1657e6526bb5118bb0ff9039a0ef02d80f79 | 62486322648182338951
ZilAccount | Faucet | 0x8ed70274d0a5f875b1cfa4faae341f2b01160dd3 | 361492292013751643
MaticAccount | PriorityWorker | 0x38df48c3c3a361dec8cebd8c140dbcdeffbe73a4 | 5533589232600000000
MaticAccount | PriorityWorker | 0x616a071b95af3af19757e27855025a34684e1f3c | 7214040088800000000
MaticAccount | PriorityWorker | 0xedb2abc82def9701e3b3b6db1ac2c13472ba4964 | 7253615428200000000
MaticAccount | PriorityWorker | 0xc03004f9ae51c8075f4381f02277295fb7a92000 | 6220146951200000000