Skip to content

Instantly share code, notes, and snippets.

{5: [(19, 12, 10, 10, 10, 10)],
6: [(18, 15, 10, 10, 10, 10)],
7: [(18, 14, 12, 10, 10, 10),
(18, 12, 12, 12, 10, 10)],
8: [(16, 16, 14, 10, 10, 10),
(16, 16, 12, 12, 10, 10),
(16, 15, 14, 12, 10, 10),
(16, 15, 12, 12, 12, 10)],
9: [(16, 14, 14, 14, 10, 10),
(16, 14, 14, 12, 12, 10),
@BlinkyStitt
BlinkyStitt / gist:299bf8e405d3840683fe0ac51cd1b664
Created September 8, 2021 03:00
Singleton deployer brownie
In [1]: account.transfer("0xBb6e024b9cFFACB947A71991E386681B1Cd1477D", ".0247 ether")
Current max gas price: 346.117 gwei
Transaction sent: 0x3249a5772daa7f44d90cd4711b5a202778013d78097289fbab31e53ab0251129
Gas price: 173.0585 gwei Gas limit: 21000 Nonce: 518
Transaction confirmed Block: 16641325 Gas used: 21000 (100.00%)
Out[1]: <Transaction '0x3249a5772daa7f44d90cd4711b5a202778013d78097289fbab31e53ab0251129'>
In [2]: web3.eth.sendRawTransaction("0xf9016c8085174876e8008303c4d88080b90154608060405234801561001057600080fd5b50610134806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634af63f0214602d575b600080fd5b60cf60048036036040811015604157600080fd5b810190602081018135640
...: 100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925060eb915050565b604080516001600160a01b0
@BlinkyStitt
BlinkyStitt / attestation.txt
Created September 3, 2021 02:59
Attestation
I contributed to the clr.fund Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: qvt32
Contributor # 42
Hash: 8ab95f64 77624750 86377c08 ee117446
0cb2a517 704051d7 fd93d04b 58138501
348d89e0 00dcfc7c d763378f 9954e9c9
38ffdb73 bbde0973 e37e9405 2cfa966c
@BlinkyStitt
BlinkyStitt / tx_info.py
Last active January 26, 2021 19:32
use brownie for debugging eth transactions
"""
Installation:
- Copy/paste this into a brownie project's `scripts/tx_info.py`
- Change the project from "ArgobytesExtraProject" to whatever your project is named.
Usage: brownie run --network mainnet scripts/tx_info.py
"""
import brownie
from brownie._cli import console

Running an Ethereum Node

There are several Ethereum nodes now, but I've had the best luck with Geth

OPTIONAL: open ports 30303 tcp and udp on your router to allow incoming network connections. this will use more CPU and bandwidth, but I've also had better luck syncing with it open.

DO NOT open ports 8545 or 8546. Those are for your own use on localhost only. If you do open these ports, you should put some sort of authentication in front of your node and probably enable less api modules.

OPTIONAL: add --snapshot to the geth command. it's an experimental feature that takes 15 GB more disk space, but it should make eth_calls faster. Be careful stopping your node abruptly or this state will have to be regenerated. If generation is going especially slow, start your node with --maxpeers 0, let the state generate, then restart without --maxpeers

NAME STATE READ WRITE CKSUM
bulk ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-HGST_HUH721010ALE604_2YKGL86D ONLINE 0 0 0
ata-WDC_WD102KRYZ-01A5AB0_VCG27D6N ONLINE 0 0 0
ata-WDC_WD102KRYZ-01A5AB0_VCG2376N ONLINE 0 0 0 (resilvering)
mirror-1 ONLINE 0 0 0
ata-WDC_WD102KRYZ-01A5AB0_VCG0AR4N ONLINE 0 0 0
ata-HGST_HUH721010ALE604_7GHWU5PK ONLINE 0 0 0
ata-WDC_WD102KRYZ-01A5AB0_VCG1UW5N ONLINE 0 0 0 (resilvering)
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
wwn-0x5000c50091e1e58a ONLINE 0 0 0
wwn-0x5000c500921fcaeb ONLINE 0 0 0
spare-1 ONLINE 0 0 0
wwn-0x5000c500a3786b43 ONLINE 0 0 0
wwn-0x5000cca267f03fa9 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
wwn-0x5000cca251daf8d4 ONLINE 0 0 0
I wrote out some solidity as some psuedocode to figure out how to do https://github.com/Synthetixio/synthetix/issues/295
I'll convert this to actual web3 calls instead of solidity once I'm sure I have all the right order of operations.
How does this look?
```solidity
function maximumRewardedArb() public view
rateNotStale("ETH")
rateNotStale("SNX")
$ mordhau
+ IMAGE=bwstitt/mordhau
+ docker pull bwstitt/mordhau
Using default tag: latest
latest: Pulling from bwstitt/mordhau
Digest: sha256:1a37d30c78cc03c04dcd6445879244d1983a4d90f01c99bc4641e4d19a0f0730
Status: Image is up to date for bwstitt/mordhau:latest
+ exec docker run --rm -it -p 0.0.0.0:7777:7777/udp -p 0.0.0.0:15000:15000/udp -p 0.0.0.0:25015:25015/udp --storage-opt size=30G --device /dev/dri:/dev/dri -v /transcode/steamcmd:/home/steam/steamcmd -v /transcode/Steam:/home/steam/Steam -v /home/mgmt/mordhau/Game.ini:/etc/mordhau/Game.ini -e SERVER_PASSWORD=fooo -e S6_KILL_GRACETIME=60 --mount type=tmpfs,destination=/tmp --name mordhau-server bwstitt/mordhau
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
# cat /home/steam/Steam/logs/stderr.txt
sh: 1: /home/steam/steamcmd/linux32/../ubuntu12_64/gldriverquery: not found
sh: 1: /home/steam/steamcmd/linux32/../ubuntu12_32/gldriverquery: not found
sh: 1: /home/steam/steamcmd/linux32/../ubuntu12_64/vulkandriverquery: not found
CApplicationManagerPopulateThread took 11 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread)
CAppInfoCacheReadFromDiskThread took 54 milliseconds to initialize