This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright (C) 2022 The Xaya developers | |
# Distributed under the MIT software license, see the accompanying | |
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
""" | |
CLI script to generate a XID password for a Polygon (or other EVM) | |
Xaya identity. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
PKGS="sqlite3 libglog" | |
CFLAGS="`pkg-config --cflags ${PKGS}` -std=c++14 -Wall -Werror -pedantic" | |
CFLAGS="${CFLAGS} -std=c++14 -Wall -Werror -pedantic" | |
CFLAGS="${CFLAGS} -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK" | |
LIBS=`pkg-config --libs ${PKGS}` | |
g++ ${CFLAGS} ${LIBS} test.cpp -o test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
jsonrpcstub test.json --cpp-client=TestRpcClient --cpp-client-file=client.h | |
jsonrpcstub test.json --cpp-server=TestServerStub --cpp-server-file=serverstub.h | |
PKGS="libjsonrpccpp-client libjsonrpccpp-server libglog" | |
CFLAGS="`pkg-config --cflags ${PKGS}` -std=c++14 -Wall -Wextra -Werror" | |
LIBS="-L/usr/local/lib `pkg-config --libs ${PKGS}` -lpthread" | |
g++ -g -O0 -o client client.cpp ${CFLAGS} ${LIBS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sqlite3.h> | |
#include <glog/logging.h> | |
#include <cstdlib> | |
#include <iostream> | |
int | |
printResults (void*, int numColumns, char** values, char** columns) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Test for https://github.com/xaya/xaya/issues/72. | |
# Should be run from within Xaya's test/functional directory. | |
from test_framework.util import str_to_b64str | |
import http.client | |
import json | |
import urllib.parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This script computes an ordered list of k random integers from the range | |
# [1, n] (both inclusive). This is done in a provably fair way based on | |
# some hex seed (may be a Bitcoin block hash, for instance). | |
import codecs | |
import hashlib | |
import math | |
import struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# This is available in "python-jsonrpclib" on Debian/Ubuntu systems. | |
import jsonrpclib | |
import json | |
# Set according to your xaya.conf or the authentication cookie. Change port | |
# to 18396 for testnet and to 18493 for regtest. | |
user = "..." |