|
| 1 | +# Stakedrop Demo Activity Log |
| 2 | + |
| 3 | +This activty log contains step-by-step actions to go from a new Ethereum account to running a staked keep-ecdsa-client on the Ropsten testnet. |
| 4 | + |
| 5 | + |
| 6 | +## Things You Need |
| 7 | + |
| 8 | +. Text editor. |
| 9 | +. An internet connection. |
| 10 | +. https://metamask.io/[Metamask] and compatible web browser. (Chrome, Firefox, Brave). |
| 11 | +. An Ethereum account with keyfile and password for the account. https://geth.ethereum.org/docs/install-and-build/installing-geth[Geth] was used with this demo. |
| 12 | +. Some amount of Ropsten ETH. https://faucet.metamask.io/[Metamask faucet]. |
| 13 | +. https://docs.docker.com/get-docker/[Docker]. |
| 14 | + |
| 15 | + |
| 16 | +## Activity Log |
| 17 | + |
| 18 | +. **Create stakedrop-demo directory** |
| 19 | + .. `mkdir -p stakedrop-demo/config stakedrop-demo/persistence` |
| 20 | + |
| 21 | +. **Create keep-ecdsa-client files** |
| 22 | + .. `cd stakedrop-demo/config` |
| 23 | + .. `touch config.toml keep-ecdsa-operator-account-address.txt keep-ecdsa-operator-account-keyfile keep-ecdsa-operator-account-password.txt` |
| 24 | + ... Final directory structure: |
| 25 | + |
| 26 | + . |
| 27 | + ├── config |
| 28 | + │ ├── config.toml |
| 29 | + │ ├── keep-ecdsa-operator-account-address.txt |
| 30 | + │ ├── keep-ecdsa-operator-account-keyfile |
| 31 | + │ └── keep-ecdsa-operator-account-password.txt |
| 32 | + └── persistence |
| 33 | + 2 directories, 4 files |
| 34 | + |
| 35 | +. **Create ETH account** |
| 36 | + .. Put your account password in the `keep-ecdsa-operator-account-password.txt` file created in step 2. Put just the password text on the first line, no other comments in the file. |
| 37 | + .. `cd stakedrop-demo/config` |
| 38 | + .. `geth account new --keystore . --password keep-ecdsa-operator-account-password.txt` |
| 39 | + .. Copy generated account address to file `keep-ecdsa-operator-account-address.txt`. Prefix the output address with `0x`. |
| 40 | + ... `0x91c9122ee29ab47908f00dc2cafaa41454f1722f` |
| 41 | + |
| 42 | + .. Copy generated keyfile (`UTC--...`) to file `keep-ecdsa-operator-account-keyfile`. |
| 43 | + ... `cp UTC--2020-06-07T18-07-48.709606000Z--91c9122ee29ab47908f00dc2cafaa41454f1722f keep-ecdsa-operator-account-keyfile` |
| 44 | + |
| 45 | +. **Import your account into Metamask** |
| 46 | + .. https://metamask.zendesk.com/hc/en-us/articles/360015489331-Importing-an-Account[ Visual Instructions] |
| 47 | + .. Select `JSON File` as import option. |
| 48 | + .. Choose the `keep-ecdsa-operator-account-keyfile` prepared earlier as the JSON file. |
| 49 | + .. Copy/Paste the password in `keep-ecdsa-operator-account-password.txt`. |
| 50 | + |
| 51 | +. **Get a KEEP token grant** |
| 52 | +.. https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#72-testnet[Documentation] |
| 53 | +.. `https://us-central1-keep-test-f3e0.cloudfunctions.net/keep-faucet-ropsten?account=0x91c9122ee29ab47908f00dc2cafaa41454f1722f` From Browser. Results in Ethereum transaction. |
| 54 | +... Expected Output: |
| 55 | + |
| 56 | + Created token grant with 300000000000000000000000 KEEP for account: 0x91c9122ee29ab47908f00dc2cafaa41454f1722f |
| 57 | + You can follow the transaction at https://ropsten.etherscan.io/tx/0x71129ec72b54529ee96298a87a734df3275baf92b918d6d48b6b8394ef2addc7 |
| 58 | + You can manage your token grants at: https://dashboard.test.keep.network. |
| 59 | + You can find us on Discord at: https://discord.gg/jqxBU4m. |
| 60 | + |
| 61 | +. **Delegate a stake from your grant** |
| 62 | +.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-get-staking-after-tge[Visual Instructions] |
| 63 | +.. https://dashboard.test.keep.network |
| 64 | +.. Log in via metamask |
| 65 | +.. Select your account imported in the previous step |
| 66 | +.. Delegate at least `100k` KEEP with `authorizer`, `beneficiary`, `operator` set as your generated account from step 3. Results in Ethereum transaction. |
| 67 | + |
| 68 | +. **Authorize operator contracts** |
| 69 | +.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-authorize-contracts[Visual Instructions] |
| 70 | +.. Click `Authorize` for `BondedECDSAKeepFactory`. Results in Ethereum Transaciton. |
| 71 | +.. Click `Authorize` for `TBTCSystem`. Results in Ethereum Transaction. |
| 72 | + |
| 73 | +. **Add ETH for bondng** |
| 74 | +.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-add-eth-for-bonding[Visual Instructions] |
| 75 | +.. Click `Add ETH`, add some nominal amount. `0.5` used for demo. Results in Ethereum Transaction. |
| 76 | + |
| 77 | +. **Prepare `keep-ecdsa-client` configuration file** |
| 78 | +.. See https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#application[Application Configuration] for template. |
| 79 | +.. Testnet contract addresses can be found https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#723-contracts[here]. |
| 80 | +.. See `/stakedrop-demo/config/config.toml` for prepared example. |
| 81 | + |
| 82 | +. Get latest Ropsten keep-ecdsa-client Docker iamge |
| 83 | +.. `docker pull keepnetwork/keep-ecdsa-client:v1.0.0` |
| 84 | + |
| 85 | +. **Start keep-ecdsa-client** |
| 86 | +.. cd `/stakedrop-demo` |
| 87 | +.. Run: |
| 88 | +``` |
| 89 | +export KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD=$(cat ./config/keep-ecdsa-operator-account-password.txt) |
| 90 | +export KEEP_ECDSA_CONFIG_DIR=$(pwd)/config |
| 91 | +export KEEP_ECDSA_PERSISTENCE_DIR=$(pwd)/persistence |
| 92 | + |
| 93 | +docker run \ |
| 94 | +--entrypoint keep-ecdsa \ |
| 95 | +--volume $KEEP_ECDSA_PERSISTENCE_DIR:/mnt/keep-ecdsa-client/persistence \ |
| 96 | +--volume $KEEP_ECDSA_CONFIG_DIR:/mnt/keep-ecdsa-client/config \ |
| 97 | +--env KEEP_ETHEREUM_PASSWORD=$KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD \ |
| 98 | +--env LOG_LEVEL=info \ |
| 99 | +-p 3919:3919 \ |
| 100 | +keepnetwork/keep-ecdsa-client:v1.0.0 --config /mnt/keep-ecdsa-client/config/config.toml start |
| 101 | +``` |
| 102 | + |
| 103 | + |
| 104 | +## Supporting Documents |
| 105 | + |
| 106 | +- https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc[Run Keep ECDSA] |
| 107 | +- https://keep-network.gitbook.io/staking-documentation/[KEEP staking guide] |
0 commit comments