Skip to content

Instantly share code, notes, and snippets.

View bogdan's full-sized avatar

Bogdan Gusiev bogdan

View GitHub Profile
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)
function get_recepients(){
var form = $.popup().find('form');
$.ajax({
url:recipients_new_job_postcard_path('.json'),
type: "post",
data: form.serialize() ,
success: function(data) {
if (data.success) {
form.find('.js-postcard-recipients').html(data.html);
form.find('.js-postcard-step').addClass('invisible');
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
Timing is on.
date | count
------------+-------
2023-04-24 | 77
2023-04-23 | 100
2023-04-22 | 134
2023-04-21 | 256
2023-04-20 | 526
2023-04-19 | 88
2023-04-18 | 137
Timing is on.
type | status | name | count | min_created | max_created | ?column?
-------------------+-----------+-----------------------+-------+----------------------------+----------------------------+----------
DomainIssueAction | Completed | | 24 | 2023-02-13 10:58:58.251008 | 2023-02-18 05:47:44.634896 | 1
DomainIssueAction | Completed | udtestingdisabled | 9 | 2023-02-20 12:23:53.472393 | 2023-02-21 13:01:01.25713 | 1
DomainIssueAction | Completed | ud-registrar-platform | 6 | 2023-02-25 02:51:31.032308 | 2023-04-20 23:23:46.287672 | 1
DomainIssueAction | Completed | frontend | 1 | 2023-04-13 11:44:41.635627 | 2023-04-13 11:44:41.635627 | 1
(4 rows)
Time: 171.366 ms