Skip to content

Instantly share code, notes, and snippets.

View cygnusv's full-sized avatar
🐛

David Núñez cygnusv

🐛
View GitHub Profile
// SPDX-License-Identifier: GPLv3
pragma solidity ^0.8;
/**
* @title IERC165
* @dev https://eips.ethereum.org/EIPS/eip-165
*/
interface IERC165 {
/**
* @notice Query if a contract implements an interface
// SPDX-License-Identifier: GPLv3
pragma solidity ^0.8;
//
// __ __ .___ ___. ___ .___________. ______ __ ___ _______ .__ __.
// | | | | | \/ | / \ | | / __ \ | |/ / | ____|| \ | |
// | | | | | \ / | / ^ \ `---| |----`| | | | | ' / | |__ | \| |
// | | | | | |\/| | / /_\ \ | | | | | | | < | __| | . ` |
// | `--' | | | | | / _____ \ | | | `--' | | . \ | |____ | |\ |
// \______/ |__| |__| /__/ \__\ |__| \______/ |__|\__\ |_______||__| \__|
((nu-ops) ) david@Davids-MacBook-Pro nu-ops % nucypher-ops nodes create
Please choose a Cloud Service Provider from these options:
aws
digitalocean
: digitalocean
Using Digital Ocean region: LON1
some relevant info:
config file: "/Users/david/Library/Application Support/nucypher-ops/configs/mainnet/nucypher/mainnet-nucypher.json"
inventory file: /Users/david/Library/Application Support/nucypher-ops/configs/mainnet-nucypher-2022-05-29.ansible_inventory.yml
ensuring cloud nodes exist for the following 1 node names:
((nucypher) ) david@Davids-MacBook-Pro nucypher % pipenv install eth-brownie -vv
Installing eth-brownie...
Installing package: eth-brownie
Writing supplied requirement line to temporary file: 'eth-brownie'
Installing 'eth-brownie'
⠙ Installing eth-brownie...$ /Users/david/.local/share/virtualenvs/nucypher-Kli1iY4z/bin/python -m pip install --pre --verbose --upgrade --exists-action=i -r /var/folders/bf/pfjp86fd0657r3lp94pgvk2r0000gn/T/pipenv-oiiwfyk2-requirements/pipenv-5lxs98h3-requirement.txt -i https://pypi.python.org/simple
Using source directory: '/Users/david/.local/share/virtualenvs/nucypher-Kli1iY4z/src'
Adding eth-brownie to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock not found, creating...
@cygnusv
cygnusv / gist:cbfd25efe328345c60067dbfe8346ca9
Created December 16, 2021 19:19
pip install umbral-pre
david@Davids-MacBook-Pro test % pip install umbral-pre
Collecting umbral-pre
Downloading umbral_pre-0.3.3.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: umbral-pre
Building wheel for umbral-pre (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/david/.pyenv/versions/3.10.1/bin/python3.10 /Users/david/.pyenv/versions/3.10.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/bf/pfjp86fd0657r3lp94pgvk2r0000gn/T/tmpknl6gf9u
(NuSnap) david@Macbook [13:29:01]:~/NuCypher/dev/NuSnap/rust-umbral (HEAD detached at d8ccef2)
└─ $ cargo build --verbose
Fresh cfg-if v1.0.0
Fresh version_check v0.9.3
Fresh unicode-xid v0.2.2
Fresh subtle v2.4.0
Fresh tap v1.0.1
Fresh wyz v0.2.0
Fresh funty v1.1.0
Fresh zeroize v1.3.0
block_to_check = self.w3.eth.getBlock(block_identifier=tx_block_number, full_transactions=False)
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/web3/eth.py", line 217, in getBlock
[block_identifier, full_transactions],
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/web3/manager.py", line 149, in request_blocking
response = self._make_request(method, params)
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/web3/manager.py", line 128, in _make_request
return request_func(method, params)
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/web3/middleware/cache.py", line 134, in middleware
return make_request(method, params)
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/web3/middleware/cache.py", line 427, in middleware
import sys
worklock_supply = 280_000_000
min_bid = 7
max_bid = 14_000
min_stake = 14_000
max_stake = 28_000_000
import random
@cygnusv
cygnusv / gist:b01058c9b1d02cd4b07933faa98f05d8
Created February 14, 2020 12:34
PoC of nucypher status events
└─ $ nucypher status events --network cassandra --contract-name StakingEscrow
███╗ ██╗██╗ ██╗
████╗ ██║██║ ██║
██╔██╗ ██║██║ ██║
██║╚██╗██║██║ ██║
██║ ╚████║╚██████╔╝
╚═╝ ╚═══╝ ╚═════╝
@cygnusv
cygnusv / gist:280881ea6399dec43e86c7efaa0c29b0
Created February 14, 2020 12:34
PoC of nucypher status events
└─ $ nucypher status events --network cassandra --contract-name StakingEscrow
███╗ ██╗██╗ ██╗
████╗ ██║██║ ██║
██╔██╗ ██║██║ ██║
██║╚██╗██║██║ ██║
██║ ╚████║╚██████╔╝
╚═╝ ╚═══╝ ╚═════╝