From e209817030d1137e7e59e7b3e68c30c4786b6f73 Mon Sep 17 00:00:00 2001 From: esaminu Date: Thu, 31 Mar 2022 01:10:54 +0400 Subject: [PATCH] chore: update README.md --- packages/utilities/README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/utilities/README.md b/packages/utilities/README.md index e1de824a94..34758d3f2c 100644 --- a/packages/utilities/README.md +++ b/packages/utilities/README.md @@ -6,9 +6,10 @@ The uitilites package provides various wallet related command line utilities. _Click on a command for more information and examples._ -| Command | Description | -| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| [`disable-2fa`](#disable-2fa) | disable 2fa using the provided seedphrase | +| Command | Description | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | +| [`disable-2fa`](#disable-2fa) | disable 2fa using the provided seedphrase | +| [`restore-account-contract`](#restore-account-contract)| restore account contract to a given `blockHash` | ## Disable 2fa @@ -21,4 +22,15 @@ This script allows the user to disable NEAR Wallet 2fa using the provided seedph ```shell= NEAR_WALLET_ENV=mainnet node index.js disable-2fa --accountId="testAccount.near" --seedPhrase='lorem ipsum dolor sit amet consectetur adipiscing elit nunc efficitur est' +``` +--- +## Restore account contract + +This script restores account code back to a given `blockHash` by deploying a contract. It pulls contract code from the given archival node +* arguments: `accountId` `seedPhrase` `nodeUrl` `blockHash` + +### Usage + +```shell= +NEAR_WALLET_ENV=testnet node index.js restore-account-contract --accountId='testAccount.testnet' --seedPhrase='lorem ipsum dolor sit amet consectetur adipiscing elit nunc efficitur est' --blockHash='9c5tk9kdTzgAgejgmnLCRu9yJ1Jp1LjFqtgB4SHEzzeB' --nodeUrl='https://sample-archival-testnet-node-url.com/' ``` \ No newline at end of file