This repository was archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Update to Stacks 2.0 transactions #40
Open
yknl
wants to merge
25
commits into
master
Choose a base branch
from
feature/stacks-2.0-tx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
Contributor
|
Currently testing this PR locally |
Contributor
Contributor
Contributor
timstackblock
suggested changes
Apr 22, 2020
Contributor
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 commands listed on the PR do not work as expected. Please update the PR with the updated commands and the default local URL you are using. We may need to update this documentation as well https://docs.blockstack.org/core/smart/cli-wallet-quickstart.html
Adds ability to pass arguments for RPC auth
This was referenced Jun 3, 2020
kyranjamie
reviewed
Jul 8, 2020
| export async function getStacksWalletKeyInfo(network: CLINetworkAdapter, mnemonic : string): Promise<StacksKeyInfoType> { | ||
| const seed = await bip39.mnemonicToSeed(mnemonic); | ||
| const master = bip32.fromSeed(seed); | ||
| const child = master.derivePath('m/44\'/5757\'/0\'/0/0'); // taken from stacks-wallet. See https://github.com/blockstack/stacks-wallet |
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.
Suggested change
| const child = master.derivePath('m/44\'/5757\'/0\'/0/0'); // taken from stacks-wallet. See https://github.com/blockstack/stacks-wallet | |
| const child = master.derivePath(`m/44'/5757'/0'/0/0`); // taken from stacks-wallet. See https://github.com/blockstack/stacks-wallet |
autoformatted to the escaped string?
Some of this code is in the keychain library, too (Copied from here).
…dejs without node-version-manager
fix "Module not found"
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This PR updates the
send_tokensandmake_keychaincommands for Stacks 2.0 and addsdeploy_contractandcall_contract_funccommands to publish and call smart contracts. The PR also adds the bin nameblockstackso commands can be called using justblockstackinstead ofblockstack-clisend_tokensnew usage:To estimate the transaction fee needed without broadcasting the transaction, add the
-eflag.To see the raw signed transaction without broadcasting, add the
-xflag.make_keychainreturnsdeploy_contractusage:To estimate the transaction fee needed without broadcasting the transaction, add the
-eflag.To see the raw signed transaction without broadcasting, add the
-xflag.call_contract_funcusage:To estimate the transaction fee needed without broadcasting the transaction, add the
-eflag.To see the raw signed transaction without broadcasting, add the
-xflag.The command will fetch the contract ABI and prompt for arguments to the function call.
Testing Instructions:
make_keychaincommand with the testnet option to generate a new key.Spin up a local testnet with the side car. Plug the address generated above into the genesis configuration. Alternatively, use the testnet faucet to send tokens to the address generated above.
Use the
send_tokenscommand to send tokens to any address. Using the-toption for testnet. By default using the-tflag sets the Stacks blockchain node that the CLI communicates with tohttp://neon.blockstack.org:20443. You can specify an alternate node using:-H "<Your local core node URL>"balancecommandYou can also specify a node to look up balances on using the
-Hflag here.deploy_contractcommand:call_contract_funccommand:Verify that function was successfully called and processed.