Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Tsai scottt

View GitHub Profile
View gist:4574be90ccfcc4f610b832c6762e7b38
Thunder 测试网资讯
1. RPC 网址
https://testnet-rpc.thundercore.com
wss://testnet-ws.thundercore.com
2. 区块浏览器
https://scan-testnet.thundercore.com
3. 发钱水龙头 Faucet
View gist:f392ce60794e9bb6446753bc35074f54
https://drill-migration.s3-ap-northeast-1.amazonaws.com/drill-migration.tar.gz
View gist:e6c690523282e3b55fe7d88cf8d8679a
https://thundercore-chain-data-us-east-1.s3.amazonaws.com/latest
View truffle-config.js
/* vim: ts=2:sw=2:et
*
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
*
* truffleframework.com/docs/advanced/configuration
View Migrations.sol
pragma solidity >=0.4.21 <0.6.0;
contract Migrations {
address public owner;
uint public last_completed_migration;
constructor() public {
owner = msg.sender;
}
View mitm.go
package network
import (
"bufio"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
@scottt
scottt / Namev2_prx11-asm-Byzantium-vs-Petersburg.diff
Created Apr 18, 2019
Diff of assembly generated for the Byzantium vs. Petersburg EVM versions for the Namev2_prx11.sol contract
View Namev2_prx11-asm-Byzantium-vs-Petersburg.diff
--- contracts/Namev2_prx11.asm 2019-04-19 00:49:46.409038062 +0800
+++ contracts/Namev2_prx11.petersburg.asm 2019-04-19 00:49:17.116352277 +0800
@@ -25,7 +25,7 @@
/* "contracts/Namev2_prx11.sol":170:188 owner = msg.sender */
dup1
sload
- not(sub(exp(0x02, 0xa0), 0x01))
+ not(sub(shl(0xa0, 0x01), 0x01))
and
/* "contracts/Namev2_prx11.sol":178:188 msg.sender */
@scottt
scottt / TWKLH-description.txt.patch
Last active Aug 20, 2018
Proposed change to TWLKH FB group description
View TWKLH-description.txt.patch
--- TWLKH-description.txt 2018-08-20 21:49:59.361145866 +0800
+++ TWLKH-description.txt.hacked 2018-08-20 22:12:40.319784822 +0800
@@ -17,23 +17,6 @@
社團另有 slack 聊天室位於
https://twlinuxkernelhackers.slack.com/
-欲加入社團FB messenger群組請洽管理員。
-
-Kernel 內容繁雜,目前依據貼文的內容用tag在 Facebook 上面分類(字母排序)
-
@scottt
scottt / stack-and-sp.c
Created Jun 11, 2018
stack-and-sp: test whether stack access without setting the stack pointer register would cause SEGFAULTs on x86-64
View stack-and-sp.c
/* x86-64 program to test wether stack access without setting the stack poitner register would cause SEGFAULTs
* $ ./stack-and-sp # just access stack adjacent memory until SEGFAULT.
* $ ./stack-and-sp --set-sp # set stack pointer register before accessing memory.
*
* Output:
* stack-and-sp: do_set_sp: 1
* RLIMIT_STACK: 8192/unlimited (cur/max)
* sp0: 0x7ffd5fdd3000
* sp: 0x7ffd5f5d7000, size: 8176K
*/