Last active
October 31, 2022 11:11
-
-
Save gballet/98d444a8330da4344c57f39cc1b512b6 to your computer and use it in GitHub Desktop.
Verkle test transactions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
txs = JSON.parse(File.open("transactions.json").read) | |
system "curl -X POST -d '#{txs[0].to_json}' -H 'Content-Type: application/json' http://localhost:8545" | |
count = 0 | |
BALANCE_JSON = `{ | |
"id": 8146302114586465, | |
"jsonrpc": "2.0", | |
"method": "eth_getBalance", | |
"params": [ | |
"0xA20538E9575c4e5CF69217173d00828fa2335030", | |
"0xd" | |
] | |
} | |
` | |
while count < 5 | |
res = JSON.parse(`curl -X POST -H 'Content-Type: application/json' -d '#{BALANCE_JSON}' http://localhost:8545`) | |
break if res['result'] != 0 | |
count++ | |
sleep 5 | |
end | |
raise "no valid balance" if count >= 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rm -rf .verkle | |
go build ./cmd/geth/... | |
echo "== Creating genesis ==" | |
./geth init --datadir=.verkle genesis_verkle.json | |
echo "== Starting the miner ==" | |
./geth --networkid 86 --datadir=.verkle --mine --miner.threads=1 \ | |
--miner.etherbase=0x6D13633A5D098D278286E1d809DA980e8B1D32F1 \ | |
--http --http.corsdomain="*" --nodiscover --http.api "net,debug,eth" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1206840801577, | |
"jsonrpc": "2.0", | |
"method": "eth_sendRawTransaction", | |
"params": [ | |
"0x02f87356808459682f0084630ee5438285fc94a20538e9575c4e5cf69217173d00828fa233503089056bc75e2d6310000080c001a0c3574bb015afc50936775f7563d65356d5e47b569dcbe5c7bf01734abe7ee44ea0023e3a8a0689702f9473eabd4fc46c2e5c9b64153784e6dc26af844f2b80dfdd" | |
] | |
}, | |
{ | |
"id": 1206840801578, | |
"jsonrpc": "2.0", | |
"method": "eth_sendRawTransaction", | |
"params": [ | |
"0x02f901c95601849502f9008496eaa49e830230118080b90170608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea26469706673582212209a159a4f3847890f10bfb87871a61eba91c5dbf5ee3cf6398207e292eee22a1664736f6c63430008070033c080a0b795b20296b9a7bbde6b429f1cf0c55b480fb08c205d04db463dbc14e07b24eba01c9e2de7fcb57b9ba7f918dd36280c1ce40b2dd5553909c0ab0d70fd57b58e09" | |
] | |
}, | |
{ | |
"id": 1206840801581, | |
"jsonrpc": "2.0", | |
"method": "eth_sendRawTransaction", | |
"params": [ | |
"0x02f88e5602849502f900849678586882e77c94c525ba625b8720505ba057040e9da12004d8ee6c80a46057361d00000000000000000000000000000000000000000000000000000000deadbeefc080a032d1ca17aa3d05c32863c7374528cbe421d1a363f66aadf808026698aad38155a042b7bccf0faf4218bb34ab46b9bdb6b6cc7e6218ee0e2ceb17ae0dc0a31bfae0" | |
] | |
}, | |
{ | |
"id": 1206840801584, | |
"jsonrpc": "2.0", | |
"method": "eth_sendRawTransaction", | |
"params": [ | |
"0x02f88e5603849502f900849597722a82a48c94c525ba625b8720505ba057040e9da12004d8ee6c80a46057361d0000000000000000000000000000000000000000000000000000000000000001c080a0e0425780d38c8e0342c9be94c3158501b14f73d50876150c1511a3f7c9f3647da01f998a0083ce63db8a2f41d6d856128b12e5d63e30e13616e4ab03fe8317cd3d" | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment