From bd17718c58171dfee8c6f45b900aaacf62bd73a6 Mon Sep 17 00:00:00 2001 From: sol wu Date: Mon, 27 Aug 2018 17:52:18 -0700 Subject: [PATCH] change default users from alice,bob,carol to addresses --- README.md | 12 ++++++------ app.js | 6 +++--- local_testnet_keys.txt | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 local_testnet_keys.txt diff --git a/README.md b/README.md index 105b3ad..05e37dc 100644 --- a/README.md +++ b/README.md @@ -68,19 +68,19 @@ test invocation: > curl -X POST http://localhost:3000/txs -d '{"type": "start", "marketId": "market2"}' -> curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 1, "amount": 10, "user": "alice"}' +> curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 1, "amount": 10, "user": "5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj"}' -> curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 2, "amount": 10, "user": "bob"}' +> curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 2, "amount": 10, "user": "9x2yu6AzwWphm3j6h9pTaJh63h5ioG8RL"}' > curl -X POST http://localhost:3000/txs -d '{"type": "oracle", "marketId": "market2", "outcome": 2}' -> curl -X POST http://localhost:3000/txs -d '{"type": "challenge", "marketId": "market2", "user": "alice", "amount": 100}' +> curl -X POST http://localhost:3000/txs -d '{"type": "challenge", "marketId": "market2", "user": "5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj", "amount": 100}' -> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "alice", "amount": 1000, "outcome": 1}' +> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj", "amount": 1000, "outcome": 1}' -> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "bob", "amount": 10, "outcome": 2}' +> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "9x2yu6AzwWphm3j6h9pTaJh63h5ioG8RL", "amount": 10, "outcome": 2}' -> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "carol", "amount": 1000, "outcome": 1}' +> curl -X POST http://localhost:3000/txs -d '{"type": "vote", "marketId": "market2", "user": "9x2yu6AzwWphm3j6h9pTaJh63h5ioG8RL", "amount": 1000, "outcome": 1}' > curl -X POST http://localhost:3000/txs -d '{"type": "distribute", "marketId": "market2"}' diff --git a/app.js b/app.js index cca5067..1bea1fe 100644 --- a/app.js +++ b/app.js @@ -34,9 +34,9 @@ let initialState = { }, // store the various market. each market will have a market state object inside this. balances: { - 'alice': 10000, - 'bob': 10000, - 'carol': 10000, + '5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj': 10000, + '9x2yu6AzwWphm3j6h9pTaJh63h5ioG8RL': 10000, + 't6bUAUxNh8xoZzt6YZdQn27J4DSiR2oH': 10000, }, } diff --git a/local_testnet_keys.txt b/local_testnet_keys.txt new file mode 100644 index 0000000..0ff8001 --- /dev/null +++ b/local_testnet_keys.txt @@ -0,0 +1,24 @@ +local node network key pairs +*** for testing only, not for production *** + + +alice: +priv key: +priv key hex: ebca1fcfba3e09e865613a87a3814813ab932936885c1b0495f1c05c7e21b1fc +pub key: +pub key hex: 02a3417c9244013ce6b6e8564e8c9caf151d5a2bd5ccd05a83fa33d55445159efa +addr: 5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj + +bob: +priv key: +priv key hex: 463852363a38c0105fc1169995696fb484ec11710ba174b3994c50baa5159423 +pub key: +pub key hex: 02f61821dfd67444dba7f2068e0988f9a7f7d11e8b35eb0fbd6a4fb3433a4684e9 +addr: 9x2yu6AzwWphm3j6h9pTaJh63h5ioG8RL + +carol: +priv key: +priv key hex: b5ca89fcbae09859e2af4bc7fc66e9b1eacf8e893dd40e47e2a99cb0aeb9204b +pub key: +pub key hex: 03f75368c8f17f36f4b737139a256de35d0154f16c31ac6b6cf2699a83083a2ae4 +addr: t6bUAUxNh8xoZzt6YZdQn27J4DSiR2oH \ No newline at end of file