parent
81d033e701
commit
6fdcbfd3ab
@ -24,14 +24,18 @@ In general, developers will implement the `main.go` function with the following
|
||||
|
||||
* First, an [`encodingCodec`](./05-encoding.md) is instantiated for the application.
|
||||
* Then, the `config` is retrieved and config parameters are set. This mainly involves setting the Bech32 prefixes for [addresses](../basics/03-accounts.md#addresses).
|
||||
```go reference
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/types/config.go#L14-L29
|
||||
```
|
||||
|
||||
* Using [cobra](https://github.com/spf13/cobra), the root command of the full-node client is created. After that, all the custom commands of the application are added using the `AddCommand()` method of `rootCmd`.
|
||||
* Add default server commands to `rootCmd` using the `server.AddCommands()` method. These commands are separated from the ones added above since they are standard and defined at Cosmos SDK level. They should be shared by all Cosmos SDK-based applications. They include the most important command: the [`start` command](#start-command).
|
||||
* Prepare and execute the `executor`.
|
||||
```go reference
|
||||
|
||||
```go reference
|
||||
https://github.com/tendermint/tendermint/blob/v0.34.21/libs/cli/setup.go#L74-L78
|
||||
|
||||
```
|
||||
|
||||
See an example of `main` function from the `simapp` application, the Cosmos SDK's application for demo purposes:
|
||||
@ -59,7 +63,7 @@ The flow of the `start` command is pretty straightforward. First, it retrieves t
|
||||
With the `db`, the `start` command creates a new instance of the application using an `appCreator` function:
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/server/start.go#L209-L209
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/server/start.go#L211
|
||||
```
|
||||
|
||||
Note that an `appCreator` is a function that fulfills the `AppCreator` signature:
|
||||
|
||||
@ -133,32 +133,16 @@ html {
|
||||
@apply w-auto justify-between;
|
||||
}
|
||||
.DocSearch-Search-Icon {
|
||||
@media (min-width: 997px) {
|
||||
@apply hidden;
|
||||
}
|
||||
@apply text-docusaurusColorBase;
|
||||
}
|
||||
.DocSearch-Button-Placeholder {
|
||||
@apply pr-8;
|
||||
}
|
||||
.DocSearch-Button-Key {
|
||||
background: none;
|
||||
@apply shadow-none bg-transparent border border-inactive text-inactive p-3 text-2 rounded-s h-6 w-6;
|
||||
}
|
||||
.DocSearch-Button-Keys,
|
||||
.DocSearch-Button-Placeholder {
|
||||
.DocSearch-Button-Keys {
|
||||
@apply hidden;
|
||||
@media (min-width: 997px) {
|
||||
@apply flex;
|
||||
}
|
||||
}
|
||||
.DocSearch-Button-Placeholder {
|
||||
@apply pr-10;
|
||||
}
|
||||
}
|
||||
|
||||
&-Search-Icon path {
|
||||
@apply fill-transparent;
|
||||
}
|
||||
path {
|
||||
@apply fill-transparent;
|
||||
}
|
||||
&-Logo path {
|
||||
@apply fill-docusaurusColorBase;
|
||||
}
|
||||
@ -441,6 +425,10 @@ html {
|
||||
}
|
||||
|
||||
/* MARKDOWN */
|
||||
.theme-code-block {
|
||||
@apply font-jetbrain;
|
||||
}
|
||||
|
||||
.markdown {
|
||||
--ifm-heading-vertical-rhythm-bottom: 1;
|
||||
--ifm-h1-vertical-rhythm-bottom: 1;
|
||||
|
||||
@ -10,65 +10,55 @@
|
||||
|
||||
/* Inter */
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Regular.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Regular.woff?v=3.19") format("woff");
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Regular.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Regular.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Medium.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Medium.woff?v=3.19") format("woff");
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Medium.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Medium.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Bold.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Bold.woff?v=3.19") format("woff");
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Bold.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Bold.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Black.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Black.woff?v=3.19") format("woff");
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: swap;
|
||||
src: url("~/static/fonts/inter/Inter-Black.woff2?v=3.19") format("woff2"),
|
||||
url("~/static/fonts/inter/Inter-Black.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
|
||||
/* Inter var */
|
||||
@font-face {
|
||||
font-family: 'Inter var';
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: oblique 0deg 10deg;
|
||||
src: url("~/static/fonts/intervar/Inter.var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
|
||||
/* Termina */
|
||||
@font-face {
|
||||
font-family: 'Termina';
|
||||
src: url("~/static/fonts/termina/termina-demi-web.woff2") format("woff2"), /* chrome、firefox */
|
||||
url("~/static/fonts/termina/termina-demi-web.woff") format("woff"), /* chrome、firefox */
|
||||
url("~/static/fonts/termina/termina-demi-web.ttf") format("truetype"); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ font-weight: 600;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
font-family: "Inter var";
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: oblique 0deg 10deg;
|
||||
src: url("~/static/fonts/intervar/Inter.var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
|
||||
/* JetBrains Mono */
|
||||
@font-face{
|
||||
font-family: 'JetBrains Mono';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url("~/static/fonts/jetbrainsmono/JetBrainsMono-Regular.woff2") format("woff2");
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url("~/static/fonts/jetbrainsmono/JetBrainsMono-Regular.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
|
||||
BIN
docs/static/fonts/termina/termina-demi-web.eot
vendored
BIN
docs/static/fonts/termina/termina-demi-web.eot
vendored
Binary file not shown.
8653
docs/static/fonts/termina/termina-demi-web.svg
vendored
8653
docs/static/fonts/termina/termina-demi-web.svg
vendored
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 538 KiB |
BIN
docs/static/fonts/termina/termina-demi-web.ttf
vendored
BIN
docs/static/fonts/termina/termina-demi-web.ttf
vendored
Binary file not shown.
BIN
docs/static/fonts/termina/termina-demi-web.woff
vendored
BIN
docs/static/fonts/termina/termina-demi-web.woff
vendored
Binary file not shown.
BIN
docs/static/fonts/termina/termina-demi-web.woff2
vendored
BIN
docs/static/fonts/termina/termina-demi-web.woff2
vendored
Binary file not shown.
@ -21,7 +21,6 @@ module.exports = {
|
||||
circle: "100%",
|
||||
},
|
||||
fontFamily: {
|
||||
termina: ["termina", defaultTheme.fontFamily.sans],
|
||||
intervar: ['"Inter var"', defaultTheme.fontFamily.sans],
|
||||
inter: ["Inter", defaultTheme.fontFamily.sans],
|
||||
jetbrain: ["JetBrains Mono", defaultTheme.fontFamily.mono],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user