@ -32,12 +32,12 @@ By the end of this tutorial, you will have:
### Check testnet status
To make sure you're not running into any challenges related to testnet status, please open up the [Status Checker](http://status.test-blockstack.com/)
To make sure you're not running into any challenges related to our network, please open up the [Status Checker](https://stacks-status.com/)
and confirm that all systems are operational. If some systems seem to have issues, it is best to wait until they are back up before you proceed with the next steps.
Furthermore, the todos app will interact with a smart contract deployed as `ST1234....todo-registry`. The contract source code is available at [GitHub](https://github.com/friedger/blockstack-todos/blob/tut/step1/contracts/todo-registry.clar).
There may already be a deployed version available on the testnet; the [testnet explorer](https://testnet-explorer.blockstack.org/) can be used to search for it.
There may already be a deployed version available on the testnet; the [Stacks Explorer](https://explorer.stacks.co/) can be used to search for it.
Alternatively, the contract can be deployed as described in the [hello world tutorial](/smart-contracts/hello-world-tutorial#step-5-deploy-the-contract). Then you have to use the corresponding contract address and name in this tutorial. Throughout this tutorial, we use `ST3YPJ6BBCZCMH71TV8BK50YC6QJTWEGCNDFWEQ15.todo-registry` as an example.
@ -127,7 +127,8 @@ Full documentation available at [stacks-gen](https://github.com/psq/stacks-gen).
STX balance and nonce can be obtained through the [`GET /v2/accounts/<stx_address>`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_info) endpoint:
All token balances can be obtained through the [`GET /extended/v1/address/<stx_address>/balances`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_balance) endpoint:
All asset events associated with the account can be obtained through the [`GET /extended/v1/address/<stx_address>/assets`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_balance) endpoint:
@ -135,7 +136,7 @@ The API will respond with a new transaction ID and confirmation that the faucet
}
```
-> Note: Wait a few minutes for the transaction to complete. You can review the status using the Explorer, by navigating to the following URL: `https://testnet-explorer.blockstack.org/txid/<txid>`.
-> Note: Wait a few minutes for the transaction to complete. You can review the status using the Explorer, by navigating to the following URL: `https://explorer.stacks.co/txid/<txid>`.
Assuming the faucet transaction was successfully processed, you can review the account history. We are expecting at least one transactions to show up in the account history.
@ -20,7 +20,8 @@ Fees are used to incentivize miners to confirm transactions on the Stacks 2.0 bl
Fee estimates can obtained through the [`GET /v2/fees/transfer`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_fee_transfer) endpoint:
The API will respond with the fee rate (as integer):
@ -56,7 +57,8 @@ The time to mine a block, to confirm transactions, will eventually match the exp
The block time is hardcoded and will change throughout the implementation phases of the [testnet](/understand-stacks/testnet). The current block time can be obtained through the [`GET /extended/v1/info/network_block_times`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_network_block_times) endpoint:
The API will respond with the block time (in seconds):
@ -83,7 +85,8 @@ However, for read-only function calls, transactions are **not** required. Instea
A read-only contract call can be done using the [`POST /v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>`](https://blockstack.github.io/stacks-blockchain-api/#operation/call_read_only_function) endpoint:
```bash
curl --location --request POST 'https://stacks-node-api.blockstack.org/v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>' \
# for mainnet, replace `testnet` with `mainnet`
curl --location --request POST 'https://stacks-node-api.testnet.stacks.co/v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender": "<stx_address>.<contract_name>",
@ -104,62 +107,19 @@ Sample response for a successful call:
## Querying
Stacks 2.0 network details can be queried using the [Stacks Blockchain API](/understand-stacks/stacks-blockchain-api) and the [status checker](http://status.test-blockstack.com/).
Stacks 2.0 network details can be queried using the [Stacks Blockchain API](/understand-stacks/stacks-blockchain-api).
### Health check
The [status checker](http://status.test-blockstack.com/) is a service that provides a user interface to quickly review the health of the Stacks 2.0 blockchain (including uptime and block rate).
The status checker can also be queried programmatically:
| `1` | Slow. The network produces new blocks at slower rate as expected. Transaction confirmation times will likely take longer than the [set block time](/understand-stacks/network#confirmations) |
| `2` | Degraded. The network seems not to be fully operational |
The [status checker](https://stacks-status.com/) is a service that provides a user interface to quickly review the health of the Stacks 2.0 blockchain.
### Network info
The network information can be obtained using the [`GET /v2/info`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_core_api_info) endpoint:
@ -103,7 +103,7 @@ Ready to get started with Stacks? Try one of our existing tutorials:
Developing on the Stacks blockchain is much simpler with the our tooling.
- **Network health checker**: Check the status of the network with the [status checker](/understand-stacks/network#health-check)
- **Explorer**: View accounts, blocks, transactions, and smart contracts broadcasted to the Stacks blockchain using the [Stacks 2.0 Explorer](https://testnet-explorer.blockstack.org/)
- **Explorer**: View accounts, blocks, transactions, and smart contracts broadcasted to the Stacks blockchain using the [Stacks Explorer](https://explorer.stacks.co/)
- **API**: Read and interact with the blockchain and with smart contract using the [Stacks 2.0 Blockchain API](/understand-stacks/stacks-blockchain-api)
- **CLI**: Use the [Stacks CLI](/understand-stacks/command-line-interface) inside your terminal
- **Libraries**: Use the [Stacks Javascript libraries](https://blockstack.github.io/stacks.js/) to integrate with the Stacks blockchain
@ -390,7 +390,8 @@ A sponsored transaction is one where a second signer sets and pays the transacti
With a serialized transaction in the [raw format](#raw-format), it can be broadcasted to the network using the [`POST /v2/transactions`](https://blockstack.github.io/stacks-blockchain-api/#operation/post_core_node_transactions) endpoint:
```bash
curl --location --request POST 'https://stacks-node-api.blockstack.org/v2/transactions' \
# for mainnet, replace `testnet` with `mainnet`
curl --location --request POST 'https://stacks-node-api.testnet.stacks.co/v2/transactions' \
--header 'Content-Type: text/plain' \
--data-raw '<tx_raw_format>'
```
@ -417,7 +418,8 @@ For convenience, a Postman Collection was created and published: [![Run in Postm
Recent transactions can be obtained through the [`GET /extended/v1/tx`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_transaction_list) endpoint:
Mempool (registered, but not processed) transactions can be obtained using the [`GET /extended/v1/tx/mempool`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_mempool_transaction_list) endpoint:
A specific transaction can be obtained using the [`GET /extended/v1/tx/<tx_id>`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_transaction_by_id) endpoint:
@ -25,7 +25,7 @@ In this tutorial, you learn how to implement a smart contract that stores and ma
### Check the Stacks 2.0 status
The Stacks 2.0 blockchain is currently in development and could experience resets and downtimes. To make sure you're not
running into any challenges related to the status of the network, please open up the [Status Checker](http://status.test-blockstack.com/)
running into any challenges related to the status of the network, please open up the [Status Checker](https://stacks-status.com/)
and confirm that all systems are operational. If some systems seem to have issues, it is best to wait until they are back up before you proceed with the next steps.
@ -27,7 +27,7 @@ By the end of this tutorial, you:
### Check the Stacks 2.0 status
The Stacks 2.0 blockchain is currently in development and could experience resets and downtimes. To make sure you're not running into any challenges related to the status of the network, please open up the [Status Checker](http://status.test-blockstack.com/) and confirm that all systems are operational. If some systems seem to have issues, it's best to wait until they're back up before you proceed with the next steps.
The Stacks 2.0 blockchain is currently in development and could experience resets and downtimes. To make sure you're not running into any challenges related to the status of the network, please open up the [Status Checker](https://stacks-status.com/) and confirm that all systems are operational. If some systems seem to have issues, it's best to wait until they're back up before you proceed with the next steps.
## Step 1: open the playground
@ -129,7 +129,7 @@ The **STX faucet** is an API endpoint you can call to request testnet tokens for
```bash
# replace <stx_address> with `address` property from your keychain