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
import sys | |
from solana.publickey import PublicKey | |
from solana.rpc.api import Client | |
from solana.rpc.types import TokenAccountOpts | |
import base64 | |
import base58 | |
import struct | |
import json | |
import requests | |
import redis |
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
<head> | |
<style type="text/css"> | |
html { | |
height: 100%; | |
} | |
body { | |
margin: 0; | |
height: 100%; | |
overflow: hidden; | |
} |
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/bash | |
set -e | |
START_NODE_NUM=1 | |
END_NODE_NUM=3 | |
ENV_FILE=".env" | |
HOMEPATH="/home/fuse" | |
function getAndUpdateBlockNumbers { |
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/bash | |
set -e | |
ENV_FILE=".env" | |
DOCKER_IMAGE_PARITY="fusenet/node" | |
DOCKER_CONTAINER_PARITY="fusenet" | |
DOCKER_IMAGE_APP="fusenet/validator-app" | |
DOCKER_CONTAINER_APP="fuseapp:" | |
DOCKER_IMAGE_NETSTAT="fusenet/netstat" | |
DOCKER_CONTAINER_NETSTAT="fusenetstat" |
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
{ | |
"default-address-pools": | |
[ | |
{"base":"172.16.0.0/16","size":24}, | |
{"base":"172.17.0.0/16","size":24} | |
] | |
} |
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
version: '2.4' | |
services: | |
rabbit: | |
cpus: 0.30 | |
mem_limit: 1250m | |
environment: ['RABBITMQ_NODENAME=node@rabbit'] | |
hostname: rabbit | |
image: rabbitmq:3 | |
container_name: fuseoracle-rabbitmq$COMPOSE_PROJECT_NAME | |
networks: |
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/bash | |
set -e | |
ENV_FILE=".env" | |
DOCKER_IMAGE_PARITY="fusenet/node" | |
DOCKER_CONTAINER_PARITY="fusenet" | |
DOCKER_IMAGE_APP="fusenet/validator-app" | |
DOCKER_CONTAINER_APP="fuseapp:" | |
DOCKER_IMAGE_NETSTAT="fusenet/netstat" | |
DOCKER_CONTAINER_NETSTAT="fusenetstat" |
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
import web3 | |
w3 = web3.Web3(web3.HTTPProvider('https://geth.golem.network:55555')) | |
tx = w3.eth.getTransaction('0x00ee93fd1e6fdbdf841b4458a078210449dce89525502c965fd3534ba397e2e3') | |
tx.hash | |
from eth_account._utils.signing import extract_chain_id, to_standard_v | |
s = w3.eth.account._keys.Signature(vrs=( | |
to_standard_v(extract_chain_id(tx.v)[1]), | |
w3.toInt(tx.r), |
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 "keccak-tiny.h" | |
#include "secp256k1.h" | |
#include "secp256k1_recovery.h" | |
std::string bytes_to_hex_string(const uint8_t *str, const uint64_t s) | |
{ | |
std::ostringstream ret; | |
for (size_t i = 0; i < s; ++i) | |
ret << std::hex << std::setfill('0') << std::setw(2) << std::nouppercase << (int) str[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
# coding=utf-8 | |
# Copyright 2018 Google LLC & Hwalsuk Lee. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
NewerOlder