-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update local deployment guide. Improve CLI commands. #485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sept-en can you rebase on top of master, such that only commits relevant to this PR are taking into account.
@mfornet now only relevant commits are applied on top of master. |
cli/index.js
Outdated
[ | ||
'near-master-account', | ||
'near-erc20-account', | ||
'near-network-id', | ||
'near-node-url', | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing near-receiver-account
Offtopic of this PR, but this is a reason why we need more consistent way to handle CLI, using a framework such as yargs.
testing/adapter/index.js
Outdated
// View | ||
async function getBridgeOnNearBalance ({ | ||
nearReceiverAccount, | ||
nearMasterAccount: nearMasterAccountId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using different name here?
nearMasterAccount: nearMasterAccountId, | |
nearMasterAccount, |
testing/adapter/index.js
Outdated
) | ||
|
||
const nearTokenContract = new nearAPI.Contract( | ||
nearMasterAccount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is undefined at this point
cli/index.js
Outdated
'--near-receiver-account <near_receiver_account>', | ||
'The account on NEAR blockchain that received the minted token.' | ||
) | ||
.description('Gets balance on Near for Rainbow-Bridge Eth on Near Prover.'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Near Prover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong info related to the old account that was used everywhere.
@@ -69,7 +69,7 @@ To learn the commands that you can use with the rainbow bridge run | |||
Alternatively, clone this repo, `yarn install`, then you can see what commands you can use with: | |||
|
|||
``` | |||
./index.js --help | |||
cli/index.js --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throughout the README the command rainbow
is being used. Either change it to use cli/index.js
everywhere, or use rainbow
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rainbow --help
command is mentioned a few lines above.
Therefore, I believe that it's good to have cli/index.js
here, so if someone decides to test using local code, it's clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a second thought, for the sake of consistency, can you remove first two instructions:
(1) npm i -g rainbow-bridge-cli
(2) rainbow --help
Since we are not releasing new versions. If a developer tries that it will just fail. So let's stick with the cli/index.js
interface for now on all the steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please address both comments.
@@ -69,7 +69,7 @@ To learn the commands that you can use with the rainbow bridge run | |||
Alternatively, clone this repo, `yarn install`, then you can see what commands you can use with: | |||
|
|||
``` | |||
./index.js --help | |||
cli/index.js --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a second thought, for the sake of consistency, can you remove first two instructions:
(1) npm i -g rainbow-bridge-cli
(2) rainbow --help
Since we are not releasing new versions. If a developer tries that it will just fail. So let's stick with the cli/index.js
interface for now on all the steps.
testing/adapter/index.js
Outdated
nearNodeUrl, | ||
}) { | ||
try { | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got it. I agree in this case it's better to stick to cli/index.js
approach.
* CLI: make transfer functions callable directly from CLI (without "TESTING" prefix). * CLI: improve `getErc20Balance` method. * CLI: add `getBridgeOnNearBalance` method. * Update README. * Minor improvements.
* CLI: make aux methods (transfer and view-balance functionality) to be called through the TESTING subcommand again. * CLI: `getBridgeOnNearBalance` - don't provide private key to the view method. * Update README.
Co-authored-by: Marcelo Fornet <mfornet94@gmail.com>
Co-authored-by: Marcelo Fornet <mfornet94@gmail.com>
@sept-en address formatting issues, right now we are using standardjs. Fix with:
|
* (#467) Minor CLI improvements. Update README. * CLI: make transfer functions callable directly from CLI (without "TESTING" prefix). * CLI: improve `getErc20Balance` method. * CLI: add `getBridgeOnNearBalance` method. * Update README. * Minor improvements. * (#467) Update README. CLI commands minor changes. * CLI: make aux methods (transfer and view-balance functionality) to be called through the TESTING subcommand again. * CLI: `getBridgeOnNearBalance` - don't provide private key to the view method. * Update README. * (#467) Update README. * Update cli/index.js Co-authored-by: Marcelo Fornet <mfornet94@gmail.com> * Update README Co-authored-by: Marcelo Fornet <mfornet94@gmail.com> * Update README. Minor improvements and fixes. * Update README: use `cli/index.js` as a rainbow cmd. * Remove redundant code. * Lint fixes. Co-authored-by: Marcelo Fornet <mfornet94@gmail.com>
Fixes #467