Skip to content

Instantly share code, notes, and snippets.

@artemii235
artemii235 / ERC20 sample ABI
Created April 23, 2020 07:00
ERC20 sample ABI
[{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"state","type":"bool"}],"name":"setTransferAgent","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"setReleaseAgent","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_SUPPLY","
@artemii235
artemii235 / Lsof idle MM2
Created February 21, 2020 06:53
Lsof idle MM2
artem@Artems-MacBook-Pro client % lsof -p 1028
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mm2 1028 artem cwd DIR 1,5 1632 1241175 /Users/artem/dev/atomicDEX-API
mm2 1028 artem txt REG 1,5 64136424 7167196 /Users/artem/dev/atomicDEX-API/target/debug/mm2
mm2 1028 artem txt REG 1,5 27824 7182636 /Library/Preferences/Logging/.plist-cache.hJrjcaOv
mm2 1028 artem txt REG 1,5 1534352 1152921500311885154 /usr/lib/dyld
mm2 1028 artem 0 PIPE 0x41185bc037a46800 16384 ->0x373cf59a5dd96490
mm2 1028 artem 1 PIPE 0x919ca182d7d78187 16384 ->0x4a8949780fb3e79a
mm2 1028 artem 2 PIPE 0x919ca182d7d78187 16384 ->0x4a8949780fb3e79a
mm2 1028 artem 3u KQUEUE count=0, state=0xa

Keybase proof

I hereby claim:

  • I am artemii235 on github.
  • I am artemii235 (https://keybase.io/artemii235) on keybase.
  • I have a public key ASBlksg08QhrdPf_UouBK98PN997qOv16kZyuwaQ2oJp8go

To claim this, I am signing this object:

@artemii235
artemii235 / MacOS DHT bootstrap failed
Created January 22, 2020 11:05
MacOS DHT bootstrap failed
LOG_UNHANDLED_ALERTS=true cargo test --features native --package mm2 --bin mm2 mm2::mm2_tests::peers_dht -- --exact --nocapture
Finished test [optimized + debuginfo] target(s) in 0.33s
Running target/debug/deps/mm2-9733ef090648aec0
running 1 test
22 11:02:58, peers:1396] initialize] netid 9999 public key 480e72af072cb1a41fe23a83c89c125f77c9eeaed2a50ff9687d43fae4c7310e preferred port 2111 drill true
22 11:02:58, peers:1396] initialize] netid 9999 public key ca79e9ce7a5027e479b6470b33b0f679c12da97dcb115bad8c7e14c2b07aba7b preferred port 2112 drill true
22 11:02:58, peers:1267] lt: 79 (log) start session
22 11:02:58, peers:1267] lt: 79 (log) version: 1.2.3.0 revision: 922aefbd5
22 11:02:58, peers:1267] lt: 79 (log) max-connections: 200 max-files: 2048
@artemii235
artemii235 / peers_dht fail log linux
Created January 22, 2020 10:58
peers_dht fail log linux
running 1 test
22 10:55:26, peers:1396] initialize] netid 9999 public key 473e1bb2381742611356b401f5fc697b0c172851ad36219769a9966409180b99 preferred port 47773 drill true
22 10:55:26, peers:1396] initialize] netid 9999 public key 14779065fbe3ba3990712b31e3b8174dcbdb34c3c4a070669842ab278fd345b6 preferred port 47774 drill true
22 10:55:26, peers:1267] lt: 79 (log) start session
22 10:55:26, peers:1267] lt: 79 (log) version: 1.2.3.0 revision: 922aefbd5
22 10:55:26, peers:1267] lt: 79 (log) max-connections: 200 max-files: 2048
22 10:55:27, peers:1267] lt: 79 (log) *** session thread init
22 10:55:27, peers:1267] lt: 79 (log) done starting session
22 10:55:27, peers:1267] lt: 79 (log) RECALCULATE UNCHOKE SLOTS: [ peers: 0 eligible-peers: 0 max_upload_rate: 0 allowed-slots: 8 ]
@artemii235
artemii235 / MakerPaymentTransactionFailed
Created January 5, 2020 09:57
MakerPaymentTransactionFailed
{
"error_events": [
"StartFailed",
"NegotiateFailed",
"TakerFeeValidateFailed",
"MakerPaymentTransactionFailed",
"MakerPaymentDataSendFailed",
"TakerPaymentValidateFailed",
"TakerPaymentSpendFailed",
"MakerPaymentRefunded",
@artemii235
artemii235 / Enable parallel test
Created July 18, 2019 12:40
Enable parallel test
#[test]
fn electrum_parallel() {
let mut mm_bob = unwrap! (MarketMakerIt::start (
json! ({
"gui": "nogui",
"netid": 9998,
"dht": "on", // Enable DHT without delay.
"myipaddr": env::var ("BOB_TRADE_IP") .ok(),
"rpcip": env::var ("BOB_TRADE_IP") .ok(),
"canbind": env::var ("BOB_TRADE_PORT") .ok().map (|s| unwrap! (s.parse::<i64>())),
{
"jsonrpc":"2.0",
"result":{
"txid":"b1734cc44ebad3c194b6c5b9905e9479b4b00319be0d9cd52e14c96acdc49801",
"hash":"b1734cc44ebad3c194b6c5b9905e9479b4b00319be0d9cd52e14c96acdc49801",
"version":2,
"size":357,
"vsize":357,
"weight":1428,
"locktime":0,
@artemii235
artemii235 / my_orders
Last active June 14, 2019 16:27
my_orders
{
"result": {
"maker_orders": {
"fedd5261-a57e-4cbf-80ac-b3507045e140": {
"base": "BEER",
"created_at": 1560529042434,
"matches": {
"60aaacca-ed31-4633-9326-c9757ea4cf78": {
"connect": {
"dest_pub_key": "c213230771ebff769c58ade63e8debac1b75062ead66796c8d793594005f3920",
@artemii235
artemii235 / swap status with my_info
Created June 10, 2019 19:27
swap status with my_info
{
"result": {
"error_events": [
"StartFailed",
"NegotiateFailed",
"TakerFeeSendFailed",
"MakerPaymentValidateFailed",
"TakerPaymentTransactionFailed",
"TakerPaymentDataSendFailed",
"TakerPaymentWaitForSpendFailed",