Taesoo Kim
Taesoo Kim
Ref. CoinMarketCap
Ref. rekt.news
Ref. defiyield.app
→ Wait, what was the market cap of Ethereum?
Ref. defiyield.app
Disclaimer. Don’t invest in cryptocurrencies! Say it out loud!
→ So you can continue to learn blockchain/smart contracts even after graduation!
The hands are faster than eye; learning by typing is effective than by reading! –Taesoo
(Can we enforce these policies with DAO?)
→ Or #ETH on your account = your grade? Open to any interesting ideas!
Ref. Immunefi
→ Likely participate in a CTF together (talking to a start-up now)!
Every week, you are asked to complete:
Each of two teams (four per team) will be organizing:
Bug hunting (or research projects)!
We reply on lots of well-prepared materials on the Internet!
→ Tutorial: Getting Started and First Transaction!
Ref. EI §1
Ref. EI §1
Ref. EI §1
Ref. EI §1
// nonce
> web3.eth.getTransactionCount("0x1c32b77528CbCd9a192bd75C407cc01F0c4004f9")
1
// balance
> web3.eth.getBalance("0x1c32b77528CbCd9a192bd75C407cc01F0c4004f9")
1.0000085262497899999985299e+26
// code
> web3.eth.getCode("0x1c32b77528CbCd9a192bd75C407cc01F0c4004f9")
"0x"
// storage
> web3.eth.getStorageAt("0x1c32b77528CbCd9a192bd75C407cc01F0c4004f9", 0)
"0x0000000000000000000000000000000000000000000000000000000000000000"
// nonce
> web3.eth.getTransactionCount("0x10F8F2f4372ca8580F1B80694fB38113627E3B73")
1
// balance
> web3.eth.getBalance("0x10F8F2f4372ca8580F1B80694fB38113627E3B73")
0
// code
> web3.eth.getCode("0x10F8F2f4372ca8580F1B80694fB38113627E3B73")
"0x6080604052600436106101445760003560e01c8063c9bbdb48116100c0578..."
// storage
> web3.eth.getStorageAt("0x10F8F2f4372ca8580F1B80694fB38113627E3B73", 0)
"0x000000000000000000000000015aa9fc32e280a70b639ecdc6203b917d9bfcdf"
Ref. EI §1
>>> from eth_utils import keccak
>>> from eth_keys import PrivateKey
>>> from hexbytes import HexBytes
>>> sk = PrivateKey(b"\x02"*32)
>>> sk.public_key
'0x4d4b6cd1361032ca .... (64 bytes)'
# address = last 20 bytes of a public key's hash
>>> HexBytes(keccak(sk.public_key.to_bytes())[-20:])
'0x5050a4f4b3f9338c3472dcc01a87c76a144b3c9c'
>>> sk.public_key.to_address()
'0x5050a4f4b3f9338c3472dcc01a87c76a144b3c9c'
>>> sk.public_key.to_checksum_address()
'0x5050A4F4b3f9338C3472dcC01A87C76A144b3c9c'
Ref. EI §1
Ref. EI §1
Ref. EI §1
Ref. EI §1
Ref. EI §1
> web3.eth.getTransaction("0x885bd6aec26a006eb2957413a626e670335289fe971168f56ae6e8a84f9c4b80")
{
from: "0x1c32b77528cbcd9a192bd75c407cc01f0c4004f9",
to: "0x5e3fc8f77d1c499c7c178d3efac6f62a1f9c669e",
chainId: "0x539",
gas: 21000,
gasPrice: 1000000007,
hash: "0x885bd6aec26a006eb2957413a626e670335289fe971168f56ae6e8a84f9c4b80",
maxFeePerGas: 1000000014,
maxPriorityFeePerGas: 1000000000,
nonce: 1,
r: "0xa49126d55d25f4e709ef506da648e2ae8d2a32776e5092abcccc913a7f364e72",
s: "0x26763b7c023ff965f451f2f18596cac4240d3be421929e88671c5b5827ecea21",
v: "0x1",
type: "0x2",
value: 1000000000
...
}
> web3.eth.getTransactionReceipt("0x885bd6aec26a006eb2957413a626e670335289fe971168f56ae6e8a84f9c4b80")
{
blockHash: "0xf1986b3663c7705a1e09e1faa54a0aec6ebdc0948688ad10aa93ce942f54d045",
blockNumber: 65702,
contractAddress: null,
cumulativeGasUsed: 21000,
effectiveGasPrice: 1000000007,
from: "0x1c32b77528cbcd9a192bd75c407cc01f0c4004f9",
gasUsed: 21000,
status: "0x1",
to: "0x5e3fc8f77d1c499c7c178d3efac6f62a1f9c669e",
transactionHash: "0x885bd6aec26a006eb2957413a626e670335289fe971168f56ae6e8a84f9c4b80",
transactionIndex: 0,
type: "0x2"
...
}
Ref. EI §1
Ref. EI §1
Ref. EI §1
Ref. EI §1