Skip to content

Commit

Permalink
Merge branch 'staging' into cardahub
Browse files Browse the repository at this point in the history
  • Loading branch information
cardahub-dev committed Jan 17, 2022
2 parents 8fc6785 + 14a5fb4 commit 256869b
Show file tree
Hide file tree
Showing 19 changed files with 328 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -38,8 +38,8 @@ yarn-error.log*
# intellij
.idea

# Auto generated content like CIPs and Rust Library
# Auto generated content like CIPs, Rust Library and Token Registry
/docs/governance/cardano-improvement-proposals/*
/static/img/cip/*
/docs/native-tokens/token-registry/*
/docs/get-started/cardano-serialization-lib/*

22 changes: 22 additions & 0 deletions WEEKLY_REPORT.md
@@ -1,7 +1,29 @@
## Cardano Developer Portal - weekly reports

### Week ending January 14th
[2022-01-14]
* cardano-wallet-interface showcase addition (#471) (Harmonic)
* Update installing-cardano-node.md (#483) (Priyank)
* Bump shelljs from 0.8.4 to 0.8.5 (#482) (dependabot[bot])

[2022-01-12]
* Add a new showcase tag (DEX) & new showcase project (MuesliSwap) (#480) (Fillips Ickevics)
* Bump follow-redirects from 1.14.5 to 1.14.7 (#479) (dependabot[bot])
* Correct era on Alonzo line (#476) (javidigani)
* Token Registry Script (#475) (Fillips Ickevics)
* Modify 'replace' functions with regex (#474) (Fillips Ickevics)
* Update minting-nfts.md (#473) (CBROS - Cardano Stake Pool)
* chore(get-started): updating cardano-node requirements (#462) (Marek Mahut)
* Update grafana-dashboard-tutorial.md (#469) (sandy4de)
* Exploring cardano-wallet - Some simplifications (#467) (Fabien Boucher)

### Week ending January 7th
[2022-01-07]
* Add ADAdice to the project showcase (#466) (Flavien Charlon)
* Update overview.md (#465) (Giovanni Gargiulo)

[2022-01-05]
* Update weekly report, week ending January 7th (#468) (Tommy Kammerer)
* Finalize serialization-lib docs auto generation (#464) (Tommy Kammerer)
* Use stack install command to install cardano-wallet (#460) (Fabien Boucher)

Expand Down
24 changes: 12 additions & 12 deletions docs/get-started/installing-cardano-node.md
Expand Up @@ -28,8 +28,8 @@ The components can be built and run on **Windows** and **MacOS**, but we recomme
To set up the components, you will need:

* **Windows**, **MacOS**, or **Linux** for your operating system
* A **CPU** with at least **two** cores
* **8GB** of RAM and at least **10GB** of free disk space
* An Intel or AMD x86 processor with **two or more cores, at 1.6GHz or faster** (2GHz or faster for a stake pool or relay)
* **12GB** of RAM and at least **30GB** of free disk space

:::note
If intending to connect to mainnet instance, the requirements for RAM and storage would increase beyond baselines above.
Expand Down Expand Up @@ -113,11 +113,11 @@ ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
```

`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.4.0.0`. So, we will use `ghcup` to install and switch to the required version.
`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.6.2.0`. So, we will use `ghcup` to install and switch to the required version.

```bash
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
ghcup install cabal 3.6.2.0
ghcup set cabal 3.6.2.0
```


Expand All @@ -141,8 +141,8 @@ cabal --version
You should see something like this:

```
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library
```

:::important
Expand Down Expand Up @@ -321,11 +321,11 @@ ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
```

`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.4.0.0`. So, we will use `ghcup` to install and switch to the required version.
`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.6.2.0`. So, we will use `ghcup` to install and switch to the required version.

```bash
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
ghcup install cabal 3.6.2.0
ghcup set cabal 3.6.2.0
```

Finally, we check if we have the correct `ghc` and `cabal` versions installed.
Expand All @@ -348,8 +348,8 @@ cabal --version
You should see something like this:

```
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library
```

:::important
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/running-cardano.md
Expand Up @@ -24,7 +24,7 @@ The `cardano-node` application requires at least four configuration files to run
- **Main Config**: It contains general node settings such as **logging** and **versioning**. It also points to the **Byron Genesis** and the **Shelly Genesis** file.
- **Byron Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Byron Era** of the **Cardano** blockchain.
- **Shelly Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Shelly Era** of the **Cardano** blockchain.
- **Alonzo Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Shelly Era** of the **Cardano** blockchain.
- **Alonzo Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Alonzo Era** of the **Cardano** blockchain.
- **Topology**: It contains the list of network peers (**`IP Address` and `Port` of other nodes running the blockchain network**) that your node will connect to.

:::important
Expand Down
40 changes: 14 additions & 26 deletions docs/integrate-cardano/creating-wallet-faucet.md
Expand Up @@ -569,8 +569,7 @@ Slotting parameters for tip are:
The first thing we can do to test if the wallet server is working correctly is to query the network information via the API.

```bash
curl --request GET \
--url http://localhost:1337/v2/network/information | jq
curl --url http://localhost:1337/v2/network/information | jq
```

The result should be something like this:
Expand Down Expand Up @@ -611,13 +610,13 @@ It is important to make sure that the `sync_progress.status` is equal to `ready`
To create a wallet we must first generate a wallet **recovery phrase** using the `cardano-wallet` in the CLI.

```bash
cardano-wallet recovery-phrase generate
cardano-wallet recovery-phrase generate | jq -c --raw-input 'split(" ")'
```

You should get a **24-word mnemonic seed** in return similar to this:

```
kit soup various toe cloud humor clip radio medal ladder casino sock various distance staff analyst success trade deal split leaf away pair camp
["shift", "badge", "heavy", "action", "tube", "divide", "course", "quality", "capable", "velvet", "cart", "marriage", "vague", "aware", "maximum", "exist", "crime", "file", "analyst", "great", "cabbage", "course", "sad", "apology"]
```

We can now create a **Cardano** wallet using the `/v2/wallets` API endpoint:
Expand All @@ -633,15 +632,7 @@ curl --request POST \
}' | jq
```

Our requests payload data looks like this:

```json
{
"name": "test2",
"mnemonic_sentence": ["kit", "soup", "various", "toe", "cloud", "humor", "clip", "radio", "medal", "ladder", "casino", "sock", "various", "distance", "staff", "analyst", "success", "trade", "deal", "split", "leaf", "away", "pair", "camp"],
"passphrase": "test123456"
}
```
Our requests payload data is composed of:

`name` : The name of the wallet.

Expand Down Expand Up @@ -706,10 +697,10 @@ If succesful, you should see something like this:
Initially, the newly created/restored wallet will need to be synced before it can be used. You can verify if the wallet is already synced by executing the following request:

```bash
curl --request GET --url http://localhost:1337/v2/wallets/c4d4e240d499cce3fed8fd885491803885fdf323 | jq '.state'
curl --url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.state'
```

***It is important to note that the `c4d4e240d499cce3fed8fd885491803885fdf323` string is actually the `wallet.id` of the previously generated wallet.***
***It is important to note that the `5076b34c6949dbd150eb9c39039037543946bdce` string is actually the `wallet.id` of the previously generated wallet.***

You should see something like this:

Expand All @@ -726,8 +717,7 @@ Now that we have created a wallet, we can now request some tAda from the **Testn
We can do that by executing the command:

```bash
curl --request GET \
--url 'http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce/addresses?state=unused' | jq '.[0]'
curl --url 'http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce/addresses?state=unused' | jq '.[0]'
```

The result should be something like this:
Expand All @@ -747,15 +737,14 @@ The result should be something like this:
```
It is important to note that the parameter of this request is the **wallet id** of the target wallet you want to get the address. In this case it is `5076b34c6949dbd150eb9c39039037543946bdce` our previously generated wallet.

We are basically querying the first wallet address that has not been used just yet, Indicated by `state: "unused"`. As we can see the wallet address value is: `addr_test1qpnjt8umuwr5f2y59avklhu8hd7h2uf4zfanxxr4nmqqsaw679hxgdmrtsjequ8ka27rm8366e6p7au9y89h6slmrjwskfmcef`
We are basically querying the first wallet address that has not been used just yet, Indicated by `state: "unused"`. As we can see the wallet address value is: `addr_test1qzf9q3qjcaf6kxshwjfw9ge29njtm56r2a08g49l79xgt4je0592agqpwraqajx2dsu2sxj64uese5s4qum293wuc00q7j6vsp"`

Now we can finally request some `tAda` for the wallet address from the [Cardano Testnet Faucet](../integrate-cardano/testnet-faucet).

Once you requested some `tAda` from the [Cardano Testnet Faucet](../integrate-cardano/testnet-faucet), we can then check if it has arrived into our wallet like so:

```bash
curl --request GET \
--url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.balance'
curl --url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.balance'
```

You should see something like this:
Expand Down Expand Up @@ -786,13 +775,14 @@ To have a clearer understanding of how sending transactions work using `cardano-
**Generate recovery-phrase**

```bash
cardano-wallet recovery-phrase generate
cardano-wallet recovery-phrase generate | jq -c --raw-input 'split(" ")'
```
**Recovery-phrase result**

```
then tattoo copy glance silk kitchen kingdom pioneer off path connect artwork alley smooth also foil glare trouble erupt move position merge scale echo
["then", "tattoo", "copy", "glance", "silk", "kitchen", "kingdom", "pioneer", "off", "path", "connect", "artwork", "alley", "smooth", "also", "foil", "glare", "trouble", "erupt", "move", "position", "merge", "scale", "echo"]
```

**Create Wallet Request**
```bash
curl --request POST \
Expand Down Expand Up @@ -869,8 +859,7 @@ We now have the following wallets:
Now let's say that we want to send `250,000,000 lovelaces` to `test_cf_2` wallet. Well first we have to get `test_cf_2` wallet address like so:

```bash
curl --request GET \
--url 'http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb/addresses?state=unused' | jq '.[0]'
curl --url 'http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb/addresses?state=unused' | jq '.[0]'
```

and we should see something like this:
Expand Down Expand Up @@ -916,8 +905,7 @@ Remember, we use the `test_cf_1` wallet id in the `http://localhost:1337/v2/wall
Now we can check `test_cf_2` wallet balance like so:

```bash
curl --request GET \
--url http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb | jq '.balance'
curl --url http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb | jq '.balance'
```

And we should see that indeed the `250,000,000 tAda` has been received (***you might need to wait for a few seconds***).
Expand Down
7 changes: 5 additions & 2 deletions docs/native-tokens/minting-nfts.md
Expand Up @@ -116,8 +116,11 @@ cd nft/

### Set variables
We will set important values in a more readable variable for better readability and debugging of failed transactions.

Since cardano-node version 1.31.0 the token name should be in hex format. We will set the variable $realtokenname (real name in utf-8) and then convert it to $tokenname (name in hex format).
```bash
tokenname=$(echo -n "NFT1" | xxd -b -ps -c 80 | tr -d '\n')
realtokenname="NFT1"
tokenname=$(echo -n $realtokenname | xxd -b -ps -c 80 | tr -d '\n')
tokenamount="1"
fee="0"
output="0"
Expand Down Expand Up @@ -314,7 +317,7 @@ If you want to generate it "on the fly," use the following commands:
echo "{" >> metadata.json
echo " \"721\": {" >> metadata.json
echo " \"$(cat policy/policyID)\": {" >> metadata.json
echo " \"$(echo $tokenname)\": {" >> metadata.json
echo " \"$(echo $realtokenname)\": {" >> metadata.json
echo " \"description\": \"This is my first NFT thanks to the Cardano foundation\"," >> metadata.json
echo " \"name\": \"Cardano foundation NFT guide token\"," >> metadata.json
echo " \"id\": \"1\"," >> metadata.json
Expand Down
1 change: 1 addition & 0 deletions docs/operate-a-stake-pool/overview.md
Expand Up @@ -58,3 +58,4 @@ You also have to build your pool around a brand that manages to attract enough s
- [Coin Cashew Guides](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node) for stake pool operators.
- [Pool Veterinary](http://pool.vet) will help you see if your Cardano stake pool is working and find out why it may not be.
- [SPOCRA](https://members.spocra.io) includes the Stake Pool installation guide from the registered trade guild - Stake Pool Operator Collective Representation Assembly
- [RaspberryPi with Docker](https://github.com/speedwing/cardano-staking-pool-edu) Full guide to build and run both testnet and mainnet Cardano Stake Pool with Docker on Raspberry Pi. [Youtube Playlist](https://www.youtube.com/playlist?list=PLBhbLwOuj0DfTnneuG3vyoDHY7Dv_aiyq)
Expand Up @@ -9,8 +9,7 @@ image: ./img/og-developer-portal.png
Once the Cardano pool sucessfully set-up, then comes the most beautifull part - setting up your Dashboard and Alerts!


This documentation brings some of the available information in greater detail and will hopefully it help the Cardano Community.
This tutorial is for education and learning purpose only!
This documentation brings some of the available information in greater detail and will hopefully help Stake Pool Operators in managing their pools more efficiently. This tutorial is for education and learning purpose only!



Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "ts-node scripts/cip.ts && ts-node scripts/rust-library.ts && docusaurus build",
"build": "ts-node scripts/cip.ts && ts-node scripts/token-registry.ts && ts-node scripts/rust-library.ts && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
Expand Down
6 changes: 3 additions & 3 deletions scripts/rust-library.ts
Expand Up @@ -15,7 +15,7 @@ const getStringContentAsync = async (url: string) => {
const stringManipulation = (content: string, fileName: string) => {

// Replace empty links
content = content.replace(']()', ']');
content = content.replace( /\]\(\)/gm, ']');

// Inject rust library additional info
content = injectRLInformation(content, fileName);
Expand All @@ -27,10 +27,10 @@ const stringManipulation = (content: string, fileName: string) => {
const injectDocusaurusDocTags = (content: string, fileName: string) => {

// Replace '-' from url in order to create a clean sidebar label
const modifiedUrl = fileName.replace('-', ' ')
const modifiedFileName = fileName.replace(/[-]/gm, ' ')

// Capitalize the first letter of each word
let sidebarLabel = modifiedUrl.toLowerCase().replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase());
let sidebarLabel = modifiedFileName.toLowerCase().replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase());

// Remove '---' from doc to add it later
content = content.substring(0, 3) === '---' ? content.slice(3) : content;
Expand Down

0 comments on commit 256869b

Please sign in to comment.