docs: vuepress setup and section titles (#311)

* vuepress

* docs: vuepress setup and TODOs

* doc scripts

* update Makefile and gitignore

* more docs updates

* gitignore

* metamask instructions

* update image

* updates

* updates from call

* docs: vuepress config and home.vue (#350)

* update uncles return (#337)

* x/evm: fix EndBlock consensus failure (#334)

* add test for sending tx w/ 21000 gas

* improve rpc transfer test

* use ctx in EndBlock

* UpdateAccounts and ClearStateObjects with passed in context

* log ethereum address on error

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* update Ethermint color variables

* add header and footer logo

* tweak config.js

* WIP custom homepage.vue

* add layout to docs/README

* update color variables

* add eth logo black and white

* tweak docs/README

* update logo and logo-bw svg

* bump 1.0.167

* homepage → home

* add icon-code, icon-rocket

* layout: home, remove configurable frontmatter: label, read, use

* clean up config.js

* bump 1.0.168

* fix missing comma from resolving conflicts

* update sidebar, config nav, path

* remove left whitespace on the header and footer logos

* clean up home.vue, docs/README

* update ethermint forum url in footer.links

* comment out custom true to enable searchbar in subpages

* remove external link icon for Guides

* comments, revert custom true

* clean up config.js, add specifications icon

Co-authored-by: noot <36753753+noot@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* final touches

Co-authored-by: Cyrus Goh <hello@lovincyrus.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
This commit is contained in:
Federico Kunze 2020-07-02 10:22:45 +02:00 committed by GitHub
parent edf4357176
commit d4fe9b234c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 12230 additions and 105 deletions

55
.gitignore vendored
View File

@ -1,22 +1,53 @@
# Binaries for programs and plugins
# OS
.DS_Store
*.swp
*.swo
*.swl
*.swm
*.swn
.vscode
.idea
*.pyc
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
# Build
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Vendor deps
.glide/
vendor/
build/
vendor
build
tools/bin/*
docs/_build
docs/tutorial
docs/node_modules
docs/modules
dist
tools-stamp
proto-tools-stamp
golangci-lint
# Goland
# Testing
coverage.txt
*.out
sim_log_file
# Vagrant
.vagrant/
*.box
*.log
vagrant
# IDE
.idea/
start.sh
*.iml
bin/
# Graphviz
dependency-graph.png
# Latex
*.aux
*.out
*.synctex.gz

View File

@ -293,3 +293,21 @@ test-sim-multi-seed-short: runsim
.PHONY: runsim test-sim-nondeterminism test-sim-custom-genesis-fast test-sim-fast sim-import-export \
test-sim-simulation-after-import test-sim-custom-genesis-multi-seed test-sim-multi-seed \
#######################
### Documentation ###
#######################
# Start docs site at localhost:8080
docs-serve:
@cd docs && \
npm install && \
npm run serve
# Build the site into docs/.vuepress/dist
docs-build:
@cd docs && \
npm install && \
npm run build

View File

@ -0,0 +1,439 @@
<template lang="pug">
div
.search__container
.search(@click="$emit('search', true)")
.search__icon
icon-search
.search__text Search
.h1 {{$frontmatter.title}}
.intro
.p {{$frontmatter.description}}
.h2 Getting Started
.p__alt Read all about Ethermint or dive straight into the code with guides.
.features
router-link(to="/quick-start").features__item.features__item__light
.features__item__image
icon-rocket.features__item__image__img
.features__item__text
.features__item__text__h2 read
.features__item__text__h1 Quick start
.features__item__text__p Deploy your own node, setup your testnet and more.
router-link(to="/guides").features__item.features__item__dark
.features__item__image
icon-code.features__item__image__img
.features__item__text
.features__item__text__h2 use
.features__item__text__h1 Guides
.features__item__text__p Follow guides to using polular Ethereum tools with Ethermint.
.sections__wrapper
.h2 Explore Ethermint
.p__alt Get familiar with Ethermint and explore its main concepts.
.sections
router-link.sections__item(tag="a" :to="section.url" v-for="section in $frontmatter.sections")
component(:is="`tm-icon-${section.icon}`").sections__item__icon
.sections__item__wrapper
.sections__item__title {{section.title}}
.sections__item__desc {{section.desc}}
.h2 Explore the stack
.p__alt Check out the docs for the various parts of the Ethermint stack.
.stack
a.stack__item(:href="item.url" v-for="item in $frontmatter.stack" :style="{'--accent': item.color, '--opacity': '5%'}")
.stack__item__wrapper
component(:is="`tm-logo-${item.label}`" :color="item.color" height="100px").stack__item__logo
svg(width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg").stack__item__icon
path(d="M1.07239 14.4697C0.779499 14.7626 0.779499 15.2374 1.07239 15.5303C1.36529 15.8232 1.84016 15.8232 2.13305 15.5303L1.07239 14.4697ZM15.7088 1.95457C16.0017 1.66168 16.0017 1.18681 15.7088 0.893912C15.4159 0.601019 14.941 0.601019 14.6482 0.893912L15.7088 1.95457ZM15.6027 1H16.3527C16.3527 0.585786 16.0169 0.25 15.6027 0.25V1ZM5.4209 0.25C5.00669 0.25 4.6709 0.585786 4.6709 1C4.6709 1.41421 5.00669 1.75 5.4209 1.75V0.25ZM14.8527 11.1818C14.8527 11.596 15.1885 11.9318 15.6027 11.9318C16.0169 11.9318 16.3527 11.596 16.3527 11.1818H14.8527ZM2.13305 15.5303L15.7088 1.95457L14.6482 0.893912L1.07239 14.4697L2.13305 15.5303ZM15.6027 0.25H5.4209V1.75H15.6027V0.25ZM16.3527 11.1818V1H14.8527V11.1818H16.3527Z" fill="#DADCE6")
div
.stack__item__h1 {{item.title}}
.stack__item__p {{item.desc}}
tm-help-support
</template>
<style lang="stylus" scoped>
/deep/
.container h1
margin-bottom 1.5rem
.search
display flex
align-items center
color rgba(22, 25, 49, 0.65)
padding-top 1rem
width calc(var(--aside-width) - 6rem)
cursor pointer
transition color .15s ease-out
&:hover
color var(--color-text, black)
&__container
display flex
justify-content flex-end
margin-top 1rem
margin-bottom 1rem
&__icon
width 1.5rem
height 1.5rem
fill #aaa
margin-right 0.5rem
transition fill .15s ease-out
&:hover &__icon
fill var(--color-text, black)
.intro
width 100%
max-width 800px
.h1
font-size 3rem
font-weight 700
margin-bottom 1.5rem
line-height 3.25rem
letter-spacing -0.02em
padding-top 2.5rem
.h2
font-size 2rem
font-weight 700
margin-top 4.5rem
margin-bottom 1rem
line-height 2.25rem
letter-spacing -0.01em
.p
font-size 1.5rem
line-height 2.25rem
&__alt
margin-top 0.75rem
margin-bottom 2rem
font-size 1.25rem
line-height 1.75rem
.features
display grid
grid-template-columns repeat(auto-fit, minmax(300px, 1fr))
gap 1.5rem
margin-bottom 5rem
margin-top 2.25rem
&__item
cursor pointer
display grid
grid-auto-flow column
grid-template-columns minmax(6rem, 1fr) 2fr
box-shadow 0px 2px 4px rgba(22, 25, 49, 0.05), 0px 0px 1px rgba(22, 25, 49, 0.2), 0px 0.5px 0px rgba(22, 25, 49, 0.05)
position relative
border-radius .5rem
background linear-gradient(302.07deg, #FFFFFF 48.96%, #EBEDFF 100%)
outline none
transition box-shadow 0.25s ease-out, transform 0.25s ease-out, opacity 0.4s ease-out
&:hover:not(:active),
&:focus
box-shadow 0px 12px 24px rgba(22, 25, 49, 0.07), 0px 4px 8px rgba(22, 25, 49, 0.05), 0px 1px 0px rgba(22, 25, 49, 0.05)
transform translateY(-2px)
transition-duration 0.1s
&:active
opacity 0.7
transition-duration 0s
&__dark
background linear-gradient(112.22deg, #161831 0%, #2E3148 100%)
&__dark &__text__h2
color white
opacity .5
&__dark &__text__h1
color white
&__dark &__text__p
color white
opacity .8
&__icon
position absolute
top 0
right 0
padding .75rem
width 1rem
height 1rem
fill white
opacity .35
&:hover &__icon
opacity .6
&__image
display flex
align-items center
justify-content center
align-self center
max-height 10rem
transition transform 0.2s ease-out
&__img
max-height 14rem
max-width 10rem
min-width 8rem
&:hover:not(:active) &__image
transform translateY(-0.25rem) scale(1.02)
transition-duration 0.1s
&__text
padding 1.75rem 2rem 2rem
display flex
flex-direction column
&__h2
font-size .75rem
letter-spacing 0.2em
text-transform uppercase
color var(--color-text-dim, inherit)
margin-bottom .25rem
&__h1
font-size 1.25rem
color var(--color-text, black)
line-height 1.75rem
letter-spacing .01em
font-weight 600
margin-top .25rem
margin-bottom .75rem
&__p
color var(--color-text-dim, inherit)
font-size .875rem
letter-spacing 0.03em
line-height 1.25rem
margin-bottom 1.5rem
.sections
display grid
margin-top 3rem
margin-bottom 5rem
grid-template-columns repeat(auto-fit, minmax(300px, 1fr))
gap 1.5rem
&__item
position relative
color initial
border-radius 0.5rem
padding 1.5rem 1.5rem 1.5rem 5.5rem
box-shadow 0px 2px 4px rgba(22, 25, 49, 0.05), 0px 0px 1px rgba(22, 25, 49, 0.2), 0px 0.5px 0px rgba(22, 25, 49, 0.05)
transition box-shadow 0.25s ease-out, transform 0.25s ease-out, opacity 0.4s ease-out
&:hover:not(:active)
box-shadow 0px 12px 24px rgba(22, 25, 49, 0.07), 0px 4px 8px rgba(22, 25, 49, 0.05), 0px 1px 0px rgba(22, 25, 49, 0.05)
transform translateY(-2px)
transition-duration 0.1s
&:active
transition-duration 0s
opacity 0.7
&__icon
position absolute
top 1rem
left 1.25rem
font-size 1.5rem
display flex
align-items center
justify-content center
width 3rem
height 3rem
&__title
font-weight 600
margin-bottom 0.5rem
&__desc
font-size 0.875rem
line-height 1.25rem
color var(--color-text-dim, inherit)
.stack
display grid
gap 1.5rem
grid-template-columns repeat(auto-fit, minmax(300px, 1fr))
margin-bottom 4rem
&__item
position relative
min-height 120px
display flex
align-items center
padding 2rem 1.25rem
border-radius 0.5rem
box-shadow 0px 2px 4px rgba(22, 25, 49, 0.05), 0px 0px 1px rgba(22, 25, 49, 0.2), 0px 0.5px 0px rgba(22, 25, 49, 0.05)
color var(--color-text, black)
background white
transition box-shadow 0.25s ease-out, transform 0.25s ease-out, opacity 0.4s ease-out
&:hover:not(:active)
box-shadow 0px 12px 24px rgba(22, 25, 49, 0.07), 0px 4px 8px rgba(22, 25, 49, 0.05), 0px 1px 0px rgba(22, 25, 49, 0.05)
transform translateY(-2px)
transition-duration 0.1s
&:active
opacity 0.7
transition-duration 0s
&__icon
position absolute
top 0
right 0
padding 1rem
opacity .35
&:hover &__icon
opacity .6
&__h1
font-size 1.25rem
line-height 1.5rem
margin-bottom 0.75rem
font-weight 600
&__p
font-size 0.875rem
color rgba(22, 25, 49, 0.65)
line-height 1.25rem
&__wrapper
display grid
grid-auto-flow column
grid-template-columns 30% 1fr
gap 1.25rem
&:before
position absolute
top 0
left 0
content ''
width 50%
height 100%
background linear-gradient(to right, var(--accent), rgba(255, 255, 255, 0))
border-radius 0.5rem
opacity 0.1
&__logo
height 72px
width auto
@media screen and (max-width: 1136px)
.p
font-size 1.25rem
line-height 1.75rem
@media screen and (max-width: 832px)
.h1
padding-top 3.5rem
.search__container
display none
@media screen and (max-width: 752px)
.search
display none
@media screen and (max-width: 500px)
.h1
font-size 2rem
line-height 2.25rem
margin-bottom 1rem
.h2
font-size 1.5rem
line-height 2rem
margin-top 3rem
margin-bottom 0.75rem
.p__alt
font-size 1rem
line-height 1.5rem
.features
margin-bottom 1.5rem
grid-template-columns repeat(auto-fit, minmax(240px, 1fr))
&__item
display block
&:not(:active)
box-shadow 0px 24px 40px rgba(0, 0, 0, 0.1), 0px 10px 16px rgba(0, 0, 0, 0.08), 0px 1px 0px rgba(0, 0, 0, 0.05)
&__image
max-height 9rem
padding-top 1rem
&__text
padding 1.5rem
.sections
gap 0
margin-bottom 0
margin-top 2rem
grid-template-columns repeat(auto-fit, minmax(240px, 1fr))
margin-left -1rem
margin-right -1rem
&__item
margin-bottom 0
padding 1.25rem 1rem 0 5.5rem
&,
&:hover:not(:active)
box-shadow none
&__icon
top 1rem
left 1.25rem
&__wrapper
padding-bottom 1.25rem
border-bottom 1px solid rgba(140, 145, 177, 0.32)
&:last-child .sections__item__wrapper
border-bottom none
&__wrapper
position relative
padding 0.1px 1rem 1rem
background white
border-radius 0.5rem
&:before
position absolute
content ''
top 0
left 0
right 0
bottom 0
border-radius 0.5rem
box-shadow 0px 24px 40px rgba(0, 0, 0, 0.1), 0px 10px 16px rgba(0, 0, 0, 0.08), 0px 1px 0px rgba(0, 0, 0, 0.05)
.stack
gap 0.75rem
grid-template-columns repeat(auto-fill, minmax(240px, 1fr))
margin-bottom 3rem
&__item
padding 1.25rem
&:not(:active)
box-shadow 0px 24px 40px rgba(22, 25, 49, 0.1), 0px 10px 16px rgba(22, 25, 49, 0.08), 0px 1px 0px rgba(22, 25, 49, 0.05)
&__wrapper
grid-template-columns 3rem 1fr
&__h1
font-size inherit
line-height inherit
margin-bottom 0.5rem
</style>

View File

@ -0,0 +1,31 @@
<template>
<svg width="100%" height="100%" viewBox="0 0 165 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="15.2" y="0.399879" width="135.6" height="115.2" rx="4.8" stroke="url(#paint0_linear)" stroke-width="0.6"/>
<rect x="0.199982" y="46.5999" width="145.2" height="94.8" transform="rotate(-15 0.199982 46.5999)" fill="url(#paint1_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M87.4269 40.4409C88.0849 40.5195 88.5547 41.1167 88.4761 41.7747L81.1977 102.735C81.1192 103.393 80.522 103.863 79.8639 103.784C79.2059 103.706 78.7361 103.109 78.8147 102.451L86.0931 41.4902C86.1716 40.8321 86.7688 40.3624 87.4269 40.4409ZM60.8853 56.9452C61.4443 57.3012 61.6089 58.0429 61.253 58.6019L46.1657 82.2944L71.0008 95.0057C71.5907 95.3076 71.8242 96.0307 71.5223 96.6206C71.2203 97.2106 70.4973 97.4441 69.9073 97.1421L43.8986 83.8301L42.7249 83.2294L43.4331 82.1173L59.2286 57.3128C59.5846 56.7538 60.3263 56.5892 60.8853 56.9452ZM94.2871 47.9121C93.6966 47.6112 92.9739 47.8459 92.673 48.4364C92.3721 49.0269 92.6068 49.7495 93.1973 50.0504L118.014 62.6977L102.942 86.455C102.587 87.0146 102.753 87.7561 103.313 88.1111C103.872 88.4661 104.614 88.3003 104.969 87.7406L120.747 62.8701L121.453 61.7568L120.278 61.1581L94.2871 47.9121Z" fill="#8CA9C6"/>
<path d="M34.1 14.7999C34.1 17.2852 32.0853 19.2999 29.6 19.2999V19.8999C32.4167 19.8999 34.7 17.6165 34.7 14.7999H34.1ZM29.6 10.2999C32.0853 10.2999 34.1 12.3146 34.1 14.7999H34.7C34.7 11.9832 32.4167 9.69988 29.6 9.69988V10.2999ZM25.1 14.7999C25.1 12.3146 27.1147 10.2999 29.6 10.2999V9.69988C26.7834 9.69988 24.5 11.9832 24.5 14.7999H25.1ZM29.6 19.2999C27.1147 19.2999 25.1 17.2852 25.1 14.7999H24.5C24.5 17.6165 26.7834 19.8999 29.6 19.8999V19.2999ZM48.4999 14.7999C48.4999 17.2852 46.4852 19.2999 43.9999 19.2999V19.8999C46.8166 19.8999 49.0999 17.6165 49.0999 14.7999H48.4999ZM43.9999 10.2999C46.4852 10.2999 48.4999 12.3146 48.4999 14.7999H49.0999C49.0999 11.9832 46.8166 9.69988 43.9999 9.69988V10.2999ZM39.4999 14.7999C39.4999 12.3146 41.5147 10.2999 43.9999 10.2999V9.69988C41.1833 9.69988 38.8999 11.9832 38.8999 14.7999H39.4999ZM43.9999 19.2999C41.5147 19.2999 39.4999 17.2852 39.4999 14.7999H38.8999C38.8999 17.6165 41.1833 19.8999 43.9999 19.8999V19.2999ZM58.4 19.8999C61.2167 19.8999 63.5 17.6165 63.5 14.7999H62.9C62.9 17.2852 60.8853 19.2999 58.4 19.2999V19.8999ZM53.3 14.7999C53.3 17.6165 55.5834 19.8999 58.4 19.8999V19.2999C55.9147 19.2999 53.9 17.2852 53.9 14.7999H53.3ZM58.4 9.69988C55.5834 9.69988 53.3 11.9832 53.3 14.7999H53.9C53.9 12.3146 55.9147 10.2999 58.4 10.2999V9.69988ZM63.5 14.7999C63.5 11.9832 61.2167 9.69988 58.4 9.69988V10.2999C60.8853 10.2999 62.9 12.3146 62.9 14.7999H63.5Z" fill="url(#paint3_linear)"/>
<path d="M15.2 29.1999H150.8" stroke="url(#paint4_linear)" stroke-width="0.6"/>
<defs>
<linearGradient id="paint0_linear" x1="120.998" y1="62.4" x2="120.998" y2="177.6" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#336699"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="127.715" y1="148.887" x2="147.74" y2="281.816" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699"/>
<stop offset="1" stop-color="#8CA9C6"/>
</linearGradient>
<linearGradient id="paint2_linear" x1="125.577" y1="107.749" x2="125.258" y2="229.399" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#336699"/>
</linearGradient>
<linearGradient id="paint3_linear" x1="81.9981" y1="72" x2="81.9981" y2="97.2" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#336699"/>
</linearGradient>
<linearGradient id="paint4_linear" x1="120.998" y1="67.2" x2="120.998" y2="163.2" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#336699"/>
</linearGradient>
</defs>
</svg>
</template>

View File

@ -0,0 +1,41 @@
<template>
<svg width="100%" height="100%" viewBox="0 0 150 230" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M129.04 81.9366L135.681 58.78L125.153 20.3152L95.8426 47.3566L89.2025 70.5132L105.801 87.8034L129.04 81.9366Z" fill="url(#paint0_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M122.412 105.051L129.028 81.9786L112.418 64.7302L89.1905 70.5552L82.5745 93.6277L99.1854 110.876L122.412 105.051Z" fill="url(#paint1_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M96.9404 193.882L115.64 128.671L98.9611 111.437L75.6844 117.214L56.5251 182.294L76.9628 188.154L96.9404 193.882Z" fill="url(#paint2_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M42.0642 201.869L93.0233 133.456L51.5928 127.542L12.0095 178.467L42.0642 201.869Z" fill="url(#paint3_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M98.6275 218.088L92.8579 134.032L131.018 150.902L135.385 214.524L98.6275 218.088Z" fill="url(#paint4_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.4626 196.23L99.4743 110.96L58.1472 105.081L5.50019 172.841L35.4626 196.23Z" stroke="url(#paint5_linear)" stroke-width="0.7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M106.575 217.245L99.4741 110.959L137.392 127.801L143.167 213.533L106.575 217.245Z" stroke="url(#paint6_linear)" stroke-width="0.7"/>
<defs>
<linearGradient id="paint0_linear" x1="127.81" y1="45.3403" x2="166.704" y2="94.5326" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699" stop-opacity="0.910609"/>
<stop offset="1" stop-color="#8CAAC6"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="117.107" y1="82.6653" x2="141.785" y2="129.845" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699" stop-opacity="0.910609"/>
<stop offset="1" stop-color="#8CAAC6"/>
</linearGradient>
<linearGradient id="paint2_linear" x1="100.64" y1="139.499" x2="144.213" y2="188.995" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699" stop-opacity="0.910609"/>
<stop offset="1" stop-color="#8CAAC6"/>
</linearGradient>
<linearGradient id="paint3_linear" x1="68.6015" y1="154.034" x2="110.557" y2="229.491" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699" stop-opacity="0.910609"/>
<stop offset="1" stop-color="#8CAAC6"/>
</linearGradient>
<linearGradient id="paint4_linear" x1="129.742" y1="171.983" x2="171.85" y2="245.124" gradientUnits="userSpaceOnUse">
<stop stop-color="#336699" stop-opacity="0.910609"/>
<stop offset="1" stop-color="#8CAAC6"/>
</linearGradient>
<linearGradient id="paint5_linear" x1="64.2552" y1="100.861" x2="36.7986" y2="196.613" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#505EFF"/>
</linearGradient>
<linearGradient id="paint6_linear" x1="133.25" y1="120.644" x2="105.628" y2="216.973" gradientUnits="userSpaceOnUse">
<stop stop-color="#8CA9C6"/>
<stop offset="1" stop-color="#505EFF"/>
</linearGradient>
</defs>
</svg>
</template>

View File

@ -0,0 +1,11 @@
<template>
<div>
<svg width="100%" height="100%" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.6" d="M39.9917 30.4542L17.5 40.6792L39.9917 53.975L62.4875 40.6792L39.9917 30.4542Z" fill="black"/>
<path opacity="0.45" d="M17.5083 40.6791L40 53.975V30.4541V3.35828L17.5083 40.6791Z" fill="black"/>
<path opacity="0.8" d="M40 3.35828V30.4541V53.975L62.4917 40.6791L40 3.35828Z" fill="black"/>
<path opacity="0.45" d="M17.5 44.9458L39.9917 76.6416V58.2333L17.5 44.9458Z" fill="black"/>
<path opacity="0.8" d="M39.9917 58.2333V76.6416L62.5 44.9458L39.9917 58.2333Z" fill="black"/>
</svg>
</div>
</template>

View File

@ -0,0 +1,7 @@
<template>
<div>
<svg width="100%" height="100%" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.3188 38.6786L40.0002 52.4512L16.6724 38.6786L40.0002 0L63.3188 38.6786ZM40.0001 75.9369L16.6724 43.0953L40.0001 56.8679L63.3371 43.0953L40.0001 75.9369ZM40.0106 22.5689C41.8663 22.5689 43.7036 22.9206 45.4097 23.5941C45.495 24.2572 45.5265 24.9236 45.5046 25.5884C43.8027 24.7855 41.9183 24.3629 40.0106 24.3629C33.1513 24.3629 27.5045 29.8641 27.1843 36.7318C30.4764 38.4276 34.3665 38.5945 37.7989 37.2405C38.3645 37.6723 38.9596 38.064 39.5805 38.4118C37.6113 39.3875 35.4391 39.9162 33.2435 39.9478C33.1741 39.9489 33.1043 39.9494 33.035 39.9494C30.5163 39.9494 28.0306 39.2905 25.8327 38.0383L25.3766 37.7786L25.3799 37.253C25.4044 33.3394 26.9318 29.6577 29.6808 26.886C32.4418 24.1021 36.1104 22.5689 40.0106 22.5689ZM54.6886 37.139C54.6364 32.2612 52.2708 27.8109 48.3276 25.1C48.3305 25.8137 48.283 26.5271 48.1854 27.2362C50.9873 29.5334 52.6955 32.916 52.8824 36.622C46.8383 39.7491 39.3006 37.5591 35.8671 31.5834C34.9397 29.9693 34.3711 28.1645 34.204 26.3205C33.6206 26.6399 33.0635 27.0074 32.5375 27.4194C32.8149 29.194 33.4176 30.9174 34.317 32.4827C36.2701 35.8819 39.4102 38.319 43.1585 39.3447C44.4302 39.6928 45.7232 39.865 47.0091 39.865C49.5145 39.865 51.9931 39.2113 54.2359 37.9305L54.6941 37.6687L54.6886 37.139ZM40.0878 12.1068L40.5393 12.3722C47.4822 16.4532 49.8515 25.4683 45.8206 32.4686C44.9135 34.0439 43.7216 35.4371 42.3214 36.5745C41.7042 36.3236 41.1102 36.0235 40.5445 35.6779C42.0591 34.6 43.3375 33.1961 44.2724 31.5723C47.7249 25.5767 45.8347 17.8993 40.0869 14.1965C36.9575 16.2106 34.8408 19.5066 34.274 23.1534C33.6161 23.4268 32.9798 23.7466 32.369 24.1104C32.5218 21.8982 33.1735 19.7309 34.2753 17.7961C35.5512 15.5558 37.4049 13.6801 39.6361 12.3718L40.0878 12.1068Z" fill="white"/>
</svg>
</div>
</template>

192
docs/.vuepress/config.js Normal file
View File

@ -0,0 +1,192 @@
module.exports = {
theme: 'cosmos',
title: 'Ethermint Documentation',
locales: {
'/': {
lang: 'en-US'
},
},
base: process.env.VUEPRESS_BASE || '/',
themeConfig: {
repo: 'ChainSafe/ethermint',
docsRepo: 'ChainSafe/ethermint',
docsDir: 'docs',
editLinks: true,
// docs 1.0.168: custom true hides subpages searchbar
// docs 1.0.168: custom true hides hub, ibc, core sidebar footer logos
custom: true,
logo: {
src: '/logo.svg',
},
algolia: {
id: 'BH4D9OD16A',
key: 'ac317234e6a42074175369b2f42e9754',
index: 'ethermint'
},
sidebar: {
auto: false,
nav: [
{
title: 'Reference',
children: [
{
title: 'Introduction',
directory: true,
path: '/intro'
},
{
title: 'Quick Start',
directory: true,
path: '/quickstart'
},
{
title: 'Basics',
directory: true,
path: '/basics'
},
{
title: 'Core Concepts',
directory: true,
path: '/core'
},
{
title: 'Guides',
directory: true,
path: '/guides'
}
]
},
{
title: 'Specifications',
children: [
{
title: 'Modules',
directory: true,
path: '/modules'
}
]
},
{
title: 'Resources',
children: [
{
title: 'Ethermint API Reference',
path: 'https://godoc.org/github.com/cosmos/ethermint'
},
{
title: 'Cosmos REST API Spec',
path: 'https://cosmos.network/rpc/'
},
{
title: 'Ethereum JSON RPC API Reference',
path: 'https://eth.wiki/json-rpc/API'
}
]
}
]
},
gutter: {
title: 'Help & Support',
editLink: true,
chat: {
title: 'Developer Chat',
text: 'Chat with Ethermint developers on Discord.',
url: 'https://discordapp.com/channels/669268347736686612',
bg: 'linear-gradient(103.75deg, #1B1E36 0%, #22253F 100%)'
},
forum: {
title: 'Ethermint Developer Forum',
text: 'Join the Ethermint Developer Forum to learn more.',
url: 'https://forum.cosmos.network/',
bg: 'linear-gradient(221.79deg, #3D6B99 -1.08%, #336699 95.88%)',
logo: 'ethereum-white'
},
github: {
title: 'Found an Issue?',
text: 'Help us improve this page by suggesting edits on GitHub.',
url: 'https://github.com/ChainSafe/ethermint/edit/development/docs/README.md',
bg: '#F8F9FC'
}
},
footer: {
logo: '/logo-bw.svg',
textLink: {
text: 'ethermint.zone',
url: 'https://ethermint.zone'
},
services: [
{
service: 'github',
url: 'https://github.com/ChainSafe/ethermint'
},
{
service: 'twitter',
url: 'https://twitter.com/chainsafeth'
},
{
service: 'linkedin',
url: 'https://www.linkedin.com/company/chainsafe-systems'
},
{
service: 'medium',
url: 'https://medium.com/chainsafe-systems'
},
],
smallprint:
'This website is maintained by [ChainSafe Systems](https://chainsafe.io). The contents and opinions of this website are those of Chainsafe Systems.',
links: [
{
title: 'Documentation',
children: [
{
title: 'Cosmos SDK Docs',
url: 'https://docs.cosmos.network'
},
{
title: 'Ethermint Docs',
url: 'https://ethereum.org/developers'
},
{
title: 'Tendermint Core Docs',
url: 'https://docs.tendermint.com'
}
]
},
{
title: 'Community',
children: [
{
title: 'Cosmos Community',
url: 'https://discord.gg/W8trcGV'
},
{
title: 'Ethermint Forum',
url: 'https://forum.cosmos.network/c/ethermint'
},
{
title: 'Chainsafe Blog',
url: 'https://medium.com/chainsafe-systems'
}
]
},
{
title: 'Contributing',
children: [
{
title: 'Contributing to the docs',
url: 'https://github.com/ChainSafe/ethermint/tree/development/docs'
},
{
title: 'Careers at Chainsafe',
url: 'https://chainsafe.io/#careers'
},
{
title: 'Source code on GitHub',
url: 'https://github.com/Chainsafe/ethermint/blob/development/docs/DOCS_README.md'
}
]
}
]
}
},
};

View File

@ -0,0 +1,28 @@
<svg width="160" height="64" viewBox="0 0 160 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M0.587524 30.9759L18.6665 41.6497V1L0.587524 30.9759Z" fill="#E6ECF2"/>
<path d="M18.6666 1V41.6497L36.7385 30.9759L18.6666 1Z" fill="#CCD9E6"/>
<path d="M0.587524 34.3989L18.6665 59.8511V45.0727L0.587524 34.3989Z" fill="#8CA9C6"/>
<path d="M18.6666 45.0727V59.8511L36.7528 34.3989L18.6666 45.0727Z" fill="#336699"/>
<g opacity="0.25">
<path d="M18.6665 22.7594L0.587524 30.976L18.6665 41.6497L36.7384 30.976L18.6665 22.7594Z" fill="#004080"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.859 19.2854C21.5368 18.7635 20.1128 18.4908 18.6747 18.4908C15.6521 18.4908 12.8089 19.6791 10.6691 21.8366C8.53862 23.9847 7.35494 26.838 7.3359 29.8711L7.33337 30.2784L7.68681 30.4797C9.39023 31.4502 11.3166 31.9607 13.2686 31.9607C13.3223 31.9607 13.3764 31.9604 13.4302 31.9595C15.1318 31.935 16.8152 31.5253 18.3414 30.7691C17.8602 30.4996 17.399 30.196 16.9606 29.8614C14.3005 30.9108 11.2857 30.7814 8.73432 29.4671C8.98249 24.1447 13.3588 19.8812 18.6747 19.8812C20.1532 19.8812 21.6136 20.2087 22.9326 20.831C22.9495 20.3158 22.9251 19.7993 22.859 19.2854" fill="#3D6B99"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.0503 29.7828C30.0098 26.0025 28.1765 22.5535 25.1205 20.4525C25.1228 21.0057 25.0859 21.5585 25.0103 22.1081C27.1818 23.8884 28.5056 26.51 28.6505 29.3821C23.9663 31.8056 18.1246 30.1083 15.4636 25.4772C14.7449 24.2262 14.3042 22.8276 14.1747 21.3984C13.7226 21.646 13.2908 21.9307 12.8832 22.2501C13.0981 23.6254 13.5652 24.961 14.2623 26.1741C15.776 28.8085 18.2095 30.6972 21.1145 31.4922C22.1 31.7619 23.1021 31.8954 24.0987 31.8954C26.0403 31.8954 27.9613 31.3888 29.6995 30.3962L30.0546 30.1932L30.0503 29.7828Z" fill="#3D6B99"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.0844 10.5885L18.7345 10.3828L18.3845 10.5882C16.6553 11.6021 15.2186 13.0558 14.2298 14.792C13.376 16.2915 12.8709 17.9711 12.7524 19.6856C13.2258 19.4037 13.719 19.1558 14.2289 18.9439C14.6681 16.1176 16.3085 13.5633 18.7339 12.0023C23.1884 14.872 24.6533 20.822 21.9776 25.4686C21.253 26.727 20.2623 27.815 19.0885 28.6504C19.5269 28.9183 19.9872 29.1508 20.4656 29.3453C21.5507 28.4638 22.4745 27.384 23.1775 26.1632C26.3014 20.738 24.4652 13.7513 19.0844 10.5885" fill="#3D6B99"/>
<path d="M52.6572 40.6197H65.2432V37.9776H55.6116V33.4861H64.0423V30.8199H55.6116V26.4485H65.1231V23.8064H52.6572V40.6197Z" fill="#15182D"/>
<path d="M71.4623 40.8359C72.5671 40.8359 73.3598 40.5957 74.0803 40.1874V37.8095C73.5039 38.0977 72.9274 38.2418 72.2789 38.2418C71.2941 38.2418 70.7177 37.7855 70.7177 36.6566V30.4356H74.1284V27.9377H70.7177V24.4549H67.8114V27.9377H66.2021V30.4356H67.8114V37.1129C67.8114 39.8991 69.3246 40.8359 71.4623 40.8359Z" fill="#15182D"/>
<path d="M75.8609 40.6197H78.7913V33.462C78.7913 31.4925 79.9682 30.3155 81.6495 30.3155C83.3789 30.3155 84.3637 31.4444 84.3637 33.414V40.6197H87.27V32.5253C87.27 29.595 85.6127 27.6735 82.7544 27.6735C80.7848 27.6735 79.6079 28.7063 78.7913 29.8832V23.0858H75.8609V40.6197Z" fill="#15182D"/>
<path d="M95.3912 40.9079C97.7211 40.9079 99.3784 39.9712 100.579 38.5301L98.874 37.0169C97.8652 38.0016 96.8564 38.5301 95.4393 38.5301C93.5658 38.5301 92.1006 37.3771 91.7884 35.3115H101.108C101.132 35.0233 101.156 34.7591 101.156 34.4949C101.156 30.844 99.1142 27.6735 95.079 27.6735C91.4521 27.6735 88.8821 30.6518 88.8821 34.2787V34.3267C88.8821 38.2418 91.7163 40.9079 95.3912 40.9079ZM91.7644 33.39C92.0286 31.4204 93.2776 30.0513 95.055 30.0513C96.9765 30.0513 98.0814 31.5165 98.2735 33.39H91.7644Z" fill="#15182D"/>
<path d="M102.85 40.6197H105.78V35.7919C105.78 32.4292 107.557 30.7719 110.103 30.7719H110.271V27.6975C108.038 27.6014 106.572 28.8984 105.78 30.7959V27.9377H102.85V40.6197Z" fill="#15182D"/>
<path d="M111.571 40.6197H114.501V33.462C114.501 31.5165 115.606 30.3155 117.215 30.3155C118.824 30.3155 119.785 31.4204 119.785 33.39V40.6197H122.691V33.462C122.691 31.4204 123.82 30.3155 125.405 30.3155C127.039 30.3155 127.976 31.3964 127.976 33.414V40.6197H130.882V32.5253C130.882 29.4268 129.2 27.6735 126.438 27.6735C124.517 27.6735 123.172 28.5622 122.163 29.9072C121.49 28.5622 120.193 27.6735 118.368 27.6735C116.422 27.6735 115.317 28.7303 114.501 29.8592V27.9377H111.571V40.6197Z" fill="#15182D"/>
<path d="M133.241 25.9921H136.363V23.2299H133.241V25.9921ZM133.337 40.6197H136.267V27.9377H133.337V40.6197Z" fill="#15182D"/>
<path d="M138.841 40.6197H141.771V33.462C141.771 31.4925 142.948 30.3155 144.629 30.3155C146.359 30.3155 147.343 31.4444 147.343 33.414V40.6197H150.25V32.5253C150.25 29.595 148.592 27.6735 145.734 27.6735C143.764 27.6735 142.588 28.7063 141.771 29.8832V27.9377H138.841V40.6197Z" fill="#15182D"/>
<path d="M156.81 40.8359C157.915 40.8359 158.707 40.5957 159.428 40.1874V37.8095C158.851 38.0977 158.275 38.2418 157.626 38.2418C156.641 38.2418 156.065 37.7855 156.065 36.6566V30.4356H159.476V27.9377H156.065V24.4549H153.159V27.9377H151.549V30.4356H153.159V37.1129C153.159 39.8991 154.672 40.8359 156.81 40.8359Z" fill="#15182D"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="160" height="64" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,33 @@
<svg width="120" height="48" viewBox="0 0 120 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<g clip-path="url(#clip1)">
<path d="M0.440674 23.2319L13.9999 31.2372V0.75L0.440674 23.2319Z" fill="#E6ECF2"/>
<path d="M14 0.75V31.2372L27.5539 23.2319L14 0.75Z" fill="#CCD9E6"/>
<path d="M0.440674 25.7992L13.9999 44.8883V33.8045L0.440674 25.7992Z" fill="#8CA9C6"/>
<path d="M14 33.8045V44.8883L27.5646 25.7992L14 33.8045Z" fill="#336699"/>
<g opacity="0.25">
<path d="M13.9999 17.0695L0.440674 23.2319L13.9999 31.2372L27.5539 23.2319L13.9999 17.0695Z" fill="#004080"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.1442 14.4641C16.1526 14.0726 15.0846 13.8682 14.006 13.8682C11.739 13.8682 9.60667 14.7594 8.00182 16.3775C6.40393 17.9886 5.51618 20.1286 5.50189 22.4033L5.5 22.7088L5.76508 22.8598C7.04264 23.5876 8.48742 23.9706 9.95145 23.9706C9.9917 23.9706 10.0323 23.9703 10.0726 23.9697C11.3488 23.9513 12.6114 23.644 13.756 23.0769C13.3951 22.8747 13.0492 22.6471 12.7204 22.3961C10.7253 23.1831 8.46424 23.0861 6.55071 22.1004C6.73684 18.1085 10.019 14.9109 14.006 14.9109C15.1149 14.9109 16.2102 15.1566 17.1994 15.6233C17.2121 15.2369 17.1938 14.8495 17.1442 14.4641Z" fill="#3D6B99"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.5377 22.337C22.5073 19.5018 21.1323 16.9151 18.8403 15.3394C18.842 15.7542 18.8144 16.1689 18.7577 16.581C20.3863 17.9163 21.3792 19.8824 21.4878 22.0365C17.9747 23.8542 13.5934 22.5812 11.5977 19.1079C11.0586 18.1696 10.7281 17.1206 10.631 16.0488C10.2919 16.2344 9.96808 16.448 9.66235 16.6875C9.82356 17.719 10.1739 18.7207 10.6967 19.6305C11.8319 21.6064 13.6571 23.0229 15.8358 23.6191C16.575 23.8214 17.3266 23.9215 18.074 23.9215C19.5302 23.9215 20.9709 23.5415 22.2746 22.7971L22.5409 22.6449L22.5377 22.337Z" fill="#3D6B99"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3133 7.94135L14.0509 7.78711L13.7884 7.94111C12.4915 8.70157 11.414 9.79186 10.6724 11.094C10.032 12.2186 9.65317 13.4783 9.56433 14.7642C9.91936 14.5528 10.2892 14.3668 10.6717 14.208C11.0011 12.0882 12.2314 10.1725 14.0504 9.00176C17.3913 11.154 18.49 15.6165 16.4832 19.1015C15.9398 20.0453 15.1967 20.8613 14.3164 21.4878C14.6452 21.6887 14.9904 21.8631 15.3492 22.009C16.163 21.3479 16.8559 20.538 17.3831 19.6224C19.7261 15.5535 18.3489 10.3134 14.3133 7.94135Z" fill="#3D6B99"/>
</g>
<path d="M39.4929 30.4648H48.9324V28.4832H41.7087V25.1145H48.0317V23.1149H41.7087V19.8363H48.8423V17.8548H39.4929V30.4648Z" fill="#15182D"/>
<path d="M53.5967 30.6269C54.4254 30.6269 55.0198 30.4467 55.5603 30.1405V28.3571C55.1279 28.5733 54.6956 28.6813 54.2092 28.6813C53.4706 28.6813 53.0383 28.3391 53.0383 27.4924V22.8267H55.5963V20.9532H53.0383V18.3411H50.8585V20.9532H49.6516V22.8267H50.8585V27.8347C50.8585 29.9243 51.9934 30.6269 53.5967 30.6269Z" fill="#15182D"/>
<path d="M56.8957 30.4648H59.0934V25.0965C59.0934 23.6193 59.9761 22.7366 61.2371 22.7366C62.5342 22.7366 63.2728 23.5833 63.2728 25.0605V30.4648H65.4525V24.3939C65.4525 22.1962 64.2095 20.7551 62.0658 20.7551C60.5886 20.7551 59.7059 21.5297 59.0934 22.4124V17.3143H56.8957V30.4648Z" fill="#15182D"/>
<path d="M71.5434 30.6809C73.2908 30.6809 74.5338 29.9784 75.4345 28.8975L74.1555 27.7626C73.3989 28.5012 72.6423 28.8975 71.5795 28.8975C70.1743 28.8975 69.0755 28.0328 68.8413 26.4836H75.8308C75.8488 26.2674 75.8669 26.0693 75.8669 25.8711C75.8669 23.1329 74.3356 20.7551 71.3092 20.7551C68.5891 20.7551 66.6616 22.9888 66.6616 25.709V25.745C66.6616 28.6813 68.7872 30.6809 71.5434 30.6809ZM68.8233 25.0425C69.0214 23.5653 69.9582 22.5385 71.2912 22.5385C72.7324 22.5385 73.561 23.6373 73.7051 25.0425H68.8233Z" fill="#15182D"/>
<path d="M77.1371 30.4648H79.3349V26.8439C79.3349 24.3219 80.6679 23.0789 82.5775 23.0789H82.7036V20.7731C81.0282 20.701 79.9294 21.6738 79.3349 23.0969V20.9532H77.1371V30.4648Z" fill="#15182D"/>
<path d="M83.6779 30.4648H85.8756V25.0965C85.8756 23.6373 86.7043 22.7366 87.9112 22.7366C89.1182 22.7366 89.8388 23.5653 89.8388 25.0425V30.4648H92.0185V25.0965C92.0185 23.5653 92.8652 22.7366 94.0541 22.7366C95.2791 22.7366 95.9816 23.5473 95.9816 25.0605V30.4648H98.1614V24.3939C98.1614 22.0701 96.9004 20.7551 94.8287 20.7551C93.3876 20.7551 92.3788 21.4216 91.6222 22.4304C91.1178 21.4216 90.145 20.7551 88.7759 20.7551C87.3168 20.7551 86.4881 21.5477 85.8756 22.3944V20.9532H83.6779V30.4648Z" fill="#15182D"/>
<path d="M99.9307 19.4941H102.273V17.4224H99.9307V19.4941ZM100.003 30.4648H102.201V20.9532H100.003V30.4648Z" fill="#15182D"/>
<path d="M104.13 30.4648H106.328V25.0965C106.328 23.6193 107.211 22.7366 108.472 22.7366C109.769 22.7366 110.507 23.5833 110.507 25.0605V30.4648H112.687V24.3939C112.687 22.1962 111.444 20.7551 109.301 20.7551C107.823 20.7551 106.941 21.5297 106.328 22.4124V20.9532H104.13V30.4648Z" fill="#15182D"/>
<path d="M117.607 30.6269C118.436 30.6269 119.03 30.4467 119.571 30.1405V28.3571C119.138 28.5733 118.706 28.6813 118.22 28.6813C117.481 28.6813 117.049 28.3391 117.049 27.4924V22.8267H119.607V20.9532H117.049V18.3411H114.869V20.9532H113.662V22.8267H114.869V27.8347C114.869 29.9243 116.004 30.6269 117.607 30.6269Z" fill="#15182D"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="120" height="48" fill="white"/>
</clipPath>
<clipPath id="clip1">
<rect width="46.5" height="46.5" fill="white" transform="translate(-9.25 0.75)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -0,0 +1,3 @@
:root
--color-link #3171B0
--color-primary #7499BF

111
docs/DOCS_README.md Normal file
View File

@ -0,0 +1,111 @@
# Updating the docs
If you want to open a PR on the Cosmos SDK to update the documentation, please follow the guidelines in the [`CONTRIBUTING.md`](https://github.com/cosmos/ethermint/tree/master/CONTRIBUTING.md#updating-documentation)
## Translating
- Docs translations live in a `docs/country-code/` folder, where `country-code` stands for the country code of the language used (`cn` for Chinese, `kr` for Korea, `fr` for France, ...).
- Always translate content living on `master`.
- Only content under `/docs/intro/`, `/docs/basics/`, `/docs/core/`, `/docs/building-modules/` and `docs/interfaces` needs to be translated, as well as `docs/README.md`. It is also nice (but not mandatory) to translate `/docs/spec/`.
- Specify the release/tag of the translation in the README of your translation folder. Update the release/tag each time you update the translation.
## Docs Build Workflow
The documentation for Ethermint is hosted at https://ethermint.cosmos.network/
built from the files in this (`/docs`) directory for
[master](https://github.com/cosmos/ethermint/tree/master/docs).
### How It Works
There is a CircleCI job listening for changes in the `/docs` directory, on
the `master` branch. Any updates to files in this directory
on that branch will automatically trigger a website deployment. Under the hood,
the private website repository has a `make build-docs` target consumed by a CircleCI job in that repo.
## README
The [README.md](./README.md) is also the landing page for the documentation
on the website. During the Jenkins build, the current commit is added to the bottom
of the README.
## Config.js
The [config.js](./.vuepress/config.js) generates the sidebar and Table of Contents
on the website docs. Note the use of relative links and the omission of
file extensions. Additional features are available to improve the look
of the sidebar.
## Links
**NOTE:** Strongly consider the existing links - both within this directory
and to the website docs - when moving or deleting files.
Relative links should be used nearly everywhere, having discovered and weighed the following:
### Relative
Where is the other file, relative to the current one?
- works both on GitHub and for the VuePress build
- confusing / annoying to have things like: `../../../../myfile.md`
- requires more updates when files are re-shuffled
### Absolute
Where is the other file, given the root of the repo?
- works on GitHub, doesn't work for the VuePress build
- this is much nicer: `/docs/hereitis/myfile.md`
- if you move that file around, the links inside it are preserved (but not to it, of course)
### Full
The full GitHub URL to a file or directory. Used occasionally when it makes sense
to send users to the GitHub.
## Building Locally
Make sure you are in the `docs` directory and run the following commands:
```bash
rm -rf node_modules
```
This command will remove old version of the visual theme and required packages. This step is optional.
```bash
npm install
```
Install the theme and all dependencies.
```bash
npm run serve
```
Run `pre` and `post` hooks and start a hot-reloading web-server. See output of this command for the URL (it is often [https://localhost:8080](https://localhost:8080)).
To build documentation as a static website run `npm run build`. You will find the website in `.vuepress/dist` directory.
## Search
We are using [Algolia](https://www.algolia.com) to power full-text search. This uses a public API search-only key in the `config.js` as well as a [cosmos_network.json](https://github.com/algolia/docsearch-configs/blob/master/configs/cosmos_network.json) configuration file that we can update with PRs.
### Update and Build the RPC docs
1. Execute the following command at the root directory to install the swagger-ui generate tool.
```bash
make tools
```
2. Edit API docs
1. Directly Edit API docs manually: `client/lcd/swagger-ui/swagger.yaml`.
2. Edit API docs within the [Swagger Editor](https://editor.swagger.io/). Please refer to this [document](https://swagger.io/docs/specification/2-0/basic-structure/) for the correct structure in `.yaml`.
3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `client/lcd/swagger-ui`.
4. Compile gaiacli
```bash
make install
```

61
docs/README.md Normal file
View File

@ -0,0 +1,61 @@
<!--
layout: home
title: Ethermint Documentation
description: Ethermint is a scalable and interoperable Ethereum, built on Proof-of-Stake with fast-finality.
sections:
- title: Introduction
desc: Read a high-level overview of Ethermint and its architecture.
url: /intro
icon: specifications
- title: Basics
desc: Start with the basic concepts of Ethermint, like accounts and transactions.
url: /basics
icon: basics
- title: Core Concepts
desc: Read about the core concepts like encoding and events.
url: /core
icon: core
stack:
- title: Cosmos SDK
desc: The SDK is the worlds most popular framework for building application-specific blockchains.
color: "#BA3FD9"
label: sdk
url: http://docs.cosmos.network
- title: Ethereum
desc: Ethereum is a global, open-source platform for decentralized applications.
color: "#1A1F36"
label: ethereum-black
url: https://eth.wiki
- title: Tendermint Core
desc: The leading BFT engine for building blockchains, powering Ethermint.
color: "#00BB00"
label: core
url: http://docs.tendermint.com
footer:
newsletter: false
aside: false
-->
# Ethermint Documentation
## Get Started
- **[Introduction](./intro/overview.md)**: High-level overview of Ethermint.
## Reference
- **[Basics](./basics/)**: Documentation on the basic concepts of Ethermint, like the standard anatomy of an application, the transaction lifecycle and accounts management.
- **[Core](./core/)**: Documentation on the core concepts of Ethermint, like `encoding`, and `events`.
- **[Building Modules](./building-modules/)**: Important concepts for module developers like `message`s, `keeper`s, `handler`s and `querier`s.
- **[Interfaces](./interfaces/)**: Documentation on building interfaces for Ethermint applications.
## Other Resources
- **[Module Directory](../x/)**: Module implementations and their respective documentation.
- **[Ethermint API Reference](https://godoc.org/github.com/cosmos/ethermint)**: Godocs of Ethermint.
- **[REST API spec](https://cosmos.network/rpc/)**: List of REST endpoints to interact with an full-node through REST.
## Contribute
See [this file](https://github.com/cosmos/ethermint/blob/master/docs/DOCS_README.md) for details of the build process and
considerations when making changes.

15
docs/basics/README.md Normal file
View File

@ -0,0 +1,15 @@
<!--
order: false
parent:
order: 3
-->
# Basics
This repository contains reference documentation on the basic concepts of Ethermint.
1. [Accounts](./accounts.md)
2. [Lifecycle of a transaction](./tx-lifecycle.md)
3. [Gas and Fees](./gas.md)
After reading the basics, head on to the [Core Reference](../core/README.md) for more advanced material.

25
docs/basics/accounts.md Normal file
View File

@ -0,0 +1,25 @@
<!--
order: 1
-->
# Accounts
This document describes the in-built accounts system of Ethermint. {synopsis}
## Pre-requisite Readings
- [Anatomy of an SDK Application](./app-anatomy.md) {prereq}
## Cosmos SDK Accounts
<!-- TODO: -->
## Ethermint Accounts
<!-- TODO: -->
## Address formats for clients
## Next {hide}
Learn about Ethermint [transactions](./transactions.md) {hide}

29
docs/basics/gas.md Normal file
View File

@ -0,0 +1,29 @@
<!--
order: 3
-->
# Gas and Fees
Learn about the differences between `Gas` and `Fees` in Ethereum and Cosmos. {synopsis}
## Introduction to `Gas` in the SDK
<!-- TODO: -->
## Matching EVM Gas consumption
<!-- TODO: -->
## Gas refunds
<!-- TODO: -->
## AnteHandler
The `AnteHandler` is a special `handler` that is run for every transaction during `CheckTx` and `DeliverTx`, before the `handler` of each `message` in the transaction. `AnteHandler`s have a different signature than `handler`s
<!-- TODO: -->
## Next {hide}
Learn more about the [Lifecycle of a transaction](./tx-lifecycle.md) {hide}

View File

@ -0,0 +1,45 @@
<!--
order: 2
-->
# Transactions
## Routing
Ethermint needs to parse and handle transactions routed for both the EVM and for the Cosmos hub. We
attempt to achieve this by mimicking [Geth's](https://github.com/ethereum/go-ethereum) `Transaction`
structure and treat it as a unique Cosmos SDK message type. An Ethereum transaction is a single
[`sdk.Msg`](https://godoc.org/github.com/cosmos/cosmos-sdk/types#Msg) contained in an
[`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx). All relevant Ethereum
transaction information is contained in this message. This includes the signature, gas, payload,
etc.
Being that Ethermint implements the Tendermint ABCI application interface, as transactions are
consumed, they are passed through a series of handlers. Once such handler, the `AnteHandler`, is
responsible for performing preliminary message execution business logic such as fee payment,
signature verification, etc. This is particular to Cosmos SDK routed transactions. Ethereum routed
transactions will bypass this as the EVM handles the same business logic.
Ethereum routed transactions coming from a web3 source are expected to be RLP encoded, however all
internal interaction between Ethermint and Tendermint will utilize one of the supported encoding
formats: Protobuf, Amino or Hybrid of the previous two.
## Transaction formats
<!-- TODO: -->
- Cosmos transactions
- Ethereum transaction
## Signatures
Ethermint supports [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)
signatures. A `Transaction` is expected to have a single signature for Ethereum routed transactions.
However, just as in Cosmos, Ethermint will support multiple signers for non-Ethereum transactions.
Signatures over the `Transaction` type are identical to Ethereum and the signatures will not be
duplicated in the embedding
[`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx).
## Next {hide}
Learn about the [encoding](./../core/encoding.md) formats used on Ethermint {hide}

14
docs/core/README.md Normal file
View File

@ -0,0 +1,14 @@
<!--
order: false
parent:
order: 4
-->
# Core Concepts
This repository contains reference documentation on the core concepts of Ethermint.
1. [Encoding](./encoding.md)
2. [Events](./events.md)
After reading the core concepts, head on to the [guides](../guides/README.md) to learn how to use Ethereum tooling with Ethermint.

73
docs/core/encoding.md Normal file
View File

@ -0,0 +1,73 @@
<!--
order: 1
-->
# Encoding
The `codec` is used everywhere in the Cosmos SDK to encode and decode structs and interfaces. The specific codec used in the Cosmos SDK is called `go-amino`. {synopsis}
## Pre-requisite Readings
- [Anatomy of an SDK application](../basics/app-anatomy.md) {prereq}
## Encoding Formats
The Cosmos SDK utilizes two binary wire encoding protocols, [Amino](https://github.com/tendermint/go-amino/)
and [Protocol Buffers](https://developers.google.com/protocol-buffers), where Amino
is an object encoding specification. It is a subset of Proto3 with an extension for
interface support. See the [Proto3 spec](https://developers.google.com/protocol-buffers/docs/proto3)
for more information on Proto3, which Amino is largely compatible with (but not with Proto2).
Due to Amino having significant performance drawbacks, being reflection-based, and
not having any meaningful cross-language/client support, Protocol Buffers, specifically
[gogoprotobuf](https://github.com/gogo/protobuf/), is being used in place of Amino.
Note, this process of using Protocol Buffers over Amino is still an ongoing process.
Binary wire encoding of types in the Cosmos SDK can be broken down into two main
categories, client encoding and store encoding. Client encoding mainly revolves
around transaction processing and signing, whereas store encoding revolves around
types used in state-machine transitions and what is ultimately stored in the Merkle
tree.
For store encoding, protobuf definitions can exist for any type and will typically
have an Amino-based "intermediary" type. Specifically, the protobuf-based type
definition is used for serialization and persistence, whereas the Amino-based type
is used for business logic in the state-machine where they may converted back-n-forth.
Note, the Amino-based types may slowly be phased-out in the future so developers
should take note to use the protobuf message definitions where possible.
In the `codec` package, there exists two core interfaces, `Marshaler` and `ProtoMarshaler`,
where the former encapsulates the current Amino interface except it operates on
types implementing the latter instead of generic `interface{}` types.
In addition, there exists three implementations of `Marshaler`. The first being
`AminoCodec`, where both binary and JSON serialization is handled via Amino. The
second being `ProtoCodec`, where both binary and JSON serialization is handled
via Protobuf. Finally, `HybridCodec`, a codec that utilizes Protobuf for binary
serialization and Amino for JSON serialization. The `HybridCodec` is typically
the codec that used in majority in situations as it's easier to use for client
and state serialization.
This means that modules may use Amino or Protobuf encoding but the types must
implement `ProtoMarshaler`. If modules wish to avoid implementing this interface
for their types, they may use an Amino codec directly.
### Amino
Every module uses an Amino codec to serialize types and interfaces. This codec typically
has types and interfaces registered in that module's domain only (e.g. messages),
but there are exceptions like `x/gov`. Each module exposes a `RegisterCodec` function
that allows a user to provide a codec and have all the types registered. An application
will call this method for each necessary module.
### Protobuf
<!-- TODO: -->
## RLP
<!-- TODO: -->
## Next {hide}
Learn about [events](./events.md) {hide}

116
docs/core/events.md Normal file
View File

@ -0,0 +1,116 @@
<!--
order: 2
-->
# Events
`Event`s are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallet to track the execution of various messages and index transactions. {synopsis}
## Pre-requisite Readings
- [Anatomy of an SDK application](../basics/app-anatomy.md) {prereq}
## Events
Events are implemented in the Cosmos SDK as an alias of the ABCI `Event` type and
take the form of: `{eventType}.{eventAttribute}={value}`.
+++ https://github.com/tendermint/tendermint/blob/bc572217c07b90ad9cee851f193aaa8e9557cbc7/abci/types/types.pb.go#L2187-L2193
Events contain:
- A `type`, which is meant to categorize an event at a high-level (e.g. by module or action).
- A list of `attributes`, which are key-value pairs that give more information about
the categorized `event`.
+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/events.go#L51-L56
Events are returned to the underlying consensus engine in the response of the following ABCI messages:
- [`BeginBlock`](./baseapp.md#beginblock)
- [`EndBlock`](./baseapp.md#endblock)
- [`CheckTx`](./baseapp.md#checktx)
- [`DeliverTx`](./baseapp.md#delivertx)
Events, the `type` and `attributes`, are defined on a **per-module basis** in the module's
`/types/events.go` file, and triggered from the module's [`handler`](../building-modules/handler.md)
via the [`EventManager`](#eventmanager). In addition, each module documents its events under
`spec/xx_events.md`.
## EventManager
In Cosmos SDK applications, events are managed by an abstraction called the `EventManager`.
Internally, the `EventManager` tracks a list of `Events` for the entire execution flow of a
transaction or `BeginBlock`/`EndBlock`.
+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/events.go#L16-L20
The `EventManager` comes with a set of useful methods to manage events. Among them, the one that is
used the most by module and application developers is the `EmitEvent` method, which tracks
an `event` in the `EventManager`.
+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/events.go#L29-L31
Module developers should handle event emission via the `EventManager#EmitEvent` in each message
`Handler` and in each `BeginBlock`/`EndBlock` handler. The `EventManager` is accessed via
the [`Context`](./context.md), where event emission generally follows this pattern:
```go
ctx.EventManager().EmitEvent(
sdk.NewEvent(eventType, sdk.NewAttribute(attributeKey, attributeValue)),
)
```
Module's `handler` function should also set a new `EventManager` to the `context` to isolate emitted events per `message`:
```go
func NewHandler(keeper Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
ctx = ctx.WithEventManager(sdk.NewEventManager())
switch msg := msg.(type) {
```
See the [`Handler`](../building-modules/handler.md) concept doc for a more detailed
view on how to typically implement `Events` and use the `EventManager` in modules.
## Subscribing to Events
It is possible to subscribe to `Events` via Tendermint's [Websocket](https://tendermint.com/docs/app-dev/subscribing-to-events-via-websocket.html#subscribing-to-events-via-websocket).
This is done by calling the `subscribe` RPC method via Websocket:
```json
{
"jsonrpc": "2.0",
"method": "subscribe",
"id": "0",
"params": {
"query": "tm.event='eventCategory' AND eventType.eventAttribute='attributeValue'"
}
}
```
The main `eventCategory` you can subscribe to are:
- `NewBlock`: Contains `events` triggered during `BeginBlock` and `EndBlock`.
- `Tx`: Contains `events` triggered during `DeliverTx` (i.e. transaction processing).
- `ValidatorSetUpdates`: Contains validator set updates for the block.
These events are triggered from the `state` package after a block is committed. You can get the
full list of `event` categories [here](https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants).
The `type` and `attribute` value of the `query` allow you to filter the specific `event` you are looking for. For example, a `transfer` transaction triggers an `event` of type `Transfer` and has `Recipient` and `Sender` as `attributes` (as defined in the [`events` file of the `bank` module](https://github.com/cosmos/cosmos-sdk/blob/master/x/bank/types/events.go)). Subscribing to this `event` would be done like so:
```json
{
"jsonrpc": "2.0",
"method": "subscribe",
"id": "0",
"params": {
"query": "tm.event='Tx' AND transfer.sender='senderAddress'"
}
}
```
where `senderAddress` is an address following the [`AccAddress`](../basics/accounts.md#addresses) format.
## Next {hide}
Learn how to connect Ethermint to [Metamask](./../guides/metamask.md) {hide}

11
docs/guides/README.md Normal file
View File

@ -0,0 +1,11 @@
<!--
order: false
parent:
order: 5
-->
# Guides
This section contains different guides to use polular Ethereum tools with Ethermint.
1. [Metamask](./metamask.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

66
docs/guides/metamask.md Normal file
View File

@ -0,0 +1,66 @@
<!--
order: 1
-->
# Metamask
Connect your Metamask wallet with Ethermint on a localnet mode. {synopsis}
## Start node and REST server
Start the Ethermint node using your terminal:
```bash
emintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info"
```
::: tip
You can also start a node from scratch by running `./init.sh` from the Ethermint repository directory. This will generate a key called `mykey` that you can use on the next step.
:::
In another tab start the REST server. Here replace `mykey` with the name of the key that you want to use and set the `chain-id` the chain identifier of your application.
```bash
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 1
```
## Adding a custom Network for Ethermint
One og the main limitations of using the default `Localhost 8545` network is that the tokens will be represented as `ETH`.
Open the Metamask extension on your browser, you may have to log in to your Metamask account if you
are not already. Then click the top right circle and go to `Settings` > `Networks`. Press the `Add
Network` button and fill the form as shown below with your application `ChainID`.
![metamask networks settings](./img/metamask_network_settings.png)
## Import Account to Metamask
Then close the settings, and go to `My Accounts` (top right circle) and select `Import Account`. You should see and image like the following one:
![metamask import account page](./img/metamask_import.png)
Now you can export your private key from the terminal using the following command. Again, make sure
to replace `mykey` with the name of the key that you want to export:
```bash
emintcli keys unsafe-export-eth-key mykey
```
Go back to the browser and select the `Private Key` option. Then paste the private key exported from
the `unsafe-export-eth-key` command.
Your account balance should show up as `1 PHOTON` and do transfers as usual.
::: tip
If it takes some time to load the balance of the account, change the network to `Main Ethereum
Network` (or any other than `Localhost 8545` or `Ethermint`) and then switch back to `Ethermint`.
:::
## Downloading State
to see metamask logs, go to top right circle -> settings -> advanced -> download state logs. if you search through the json file for the account address you'll find the tx history
## Known issues
Currently, it's not possible to add custom tokens (even for Photons) unless you deploy a token contract (eg: ERC20).

View File

@ -1,50 +1,18 @@
<!--
order: false
parent:
order: 1
-->
# Introduction
## What is Ethermint
This folder contains introduction material for Ethermint.
Ethermint is a high throughput PoS blockchain that is fully compatible and
interoperable with Ethereum. In other words, it allows for running vanilla Ethereum
on top of [Tendermint](https://github.com/tendermint/tendermint) consensus via
the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/). This allows developers
to have all the desired features of Ethereum, while at the same time benefit
from Tendermints PoS implementation. Also, because it is built on top of the
Cosmos SDK, it will be able to exchange value with the rest of the Cosmos Ecosystem.
1. [Overview](./overview.md)
1. [Architecture](./architecture.md)
Heres a glance at some of the key features of Ethermint:
After reading the introduction material, head over to the [basics](../basics/README.md) to learn more.
* Web3 compatibility
* High throughput
* Horizontal scalability
* Transaction finality
## Next {hide}
Ethermint enables these key features through:
* Implementing Tendermint's ABCI application interface to manage the base Blockchain
* Leveraging [modules](https://github.com/cosmos/cosmos-sdk/tree/master/x/) and other mechanisms implemented by the Cosmos SDK
* Utilizing [`geth`](https://github.com/ethereum/go-ethereum) as a library to avoid code reuse and improve maintainability
* Exposing a fully compatible Web3 RPC layer for interacting with the system
The sum of these features allows developers to leverage existing Ethereum ecosystem
tooling and software to seamlessly deploy smart contracts which interact with the rest of the Cosmos
ecosystem!
## In-depth Topics
### Tendermint Core & the Application Blockchain Interface (ABCI)
Tendermint consists of two chief technical components: a blockchain consensus
engine and a generic application interface. The consensus engine, called
Tendermint Core, ensures that the same transactions are recorded on every machine
in the same order. The application interface, called the Application Blockchain
Interface (ABCI), enables the transactions to be processed in any programming
language.
Tendermint has evolved to be a general purpose blockchain consensus engine that
can host arbitrary application states. Since Tendermint can replicate arbitrary
applications, it can be used as a plug-and-play replacement for the consensus
engines of other blockchains. Ethermint is such an example of an ABCI application
replacing Ethereum's PoW via Tendermint's consensus engine.
Another example of a cryptocurrency application built on Tendermint is the Cosmos
network. Tendermint is able to decompose the blockchain design by offering a very
simple API (ie. the ABCI) between the application process and consensus process.
Get an high-level [overview](./overview.md) of Ethermint {hide}

View File

@ -0,0 +1,38 @@
<!--
order: 2
-->
# Architecture
Learn how Ethermint's architecture leverages the Cosmos SDK Proof-of-Stake functionallity, EVM compatibility and fast-finality from Tendermint Core's BFT consensus. {synopsis}
## Cosmos-SDK
<!-- TODO: -->
## Tendermint Core & the Application Blockchain Interface (ABCI)
Tendermint consists of two chief technical components: a blockchain consensus
engine and a generic application interface. The consensus engine, called
Tendermint Core, ensures that the same transactions are recorded on every machine
in the same order. The application interface, called the Application Blockchain
Interface (ABCI), enables the transactions to be processed in any programming
language.
Tendermint has evolved to be a general purpose blockchain consensus engine that
can host arbitrary application states. Since Tendermint can replicate arbitrary
applications, it can be used as a plug-and-play replacement for the consensus
engines of other blockchains. Ethermint is such an example of an ABCI application
replacing Ethereum's PoW via Tendermint's consensus engine.
Another example of a cryptocurrency application built on Tendermint is the Cosmos
network. Tendermint is able to decompose the blockchain design by offering a very
simple API (ie. the ABCI) between the application process and consensus process.
## EVM module
<!-- TODO: -->
## Next {hide}
Learn how to run an Ethermint [node](./../quickstart/run_node.md) {hide}

37
docs/intro/overview.md Normal file
View File

@ -0,0 +1,37 @@
<!--
order: 1
-->
# High-level Overview
## What is Ethermint
Ethermint is a high throughput PoS blockchain that is fully compatible and
interoperable with Ethereum. In other words, it allows for running vanilla Ethereum
on top of [Tendermint](https://github.com/tendermint/tendermint) consensus via
the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/). This allows developers
to have all the desired features of Ethereum, while at the same time benefit
from Tendermints PoS implementation. Also, because it is built on top of the
Cosmos SDK, it will be able to exchange value with the rest of the Cosmos Ecosystem.
Heres a glance at some of the key features of Ethermint:
* Web3 compatibility
* High throughput
* Horizontal scalability
* Transaction finality
Ethermint enables these key features through:
* Implementing Tendermint's ABCI application interface to manage the base Blockchain
* Leveraging [modules](https://github.com/cosmos/cosmos-sdk/tree/master/x/) and other mechanisms implemented by the Cosmos SDK
* Utilizing [`geth`](https://github.com/ethereum/go-ethereum) as a library to avoid code reuse and improve maintainability
* Exposing a fully compatible Web3 RPC layer for interacting with the system
The sum of these features allows developers to leverage existing Ethereum ecosystem
tooling and software to seamlessly deploy smart contracts which interact with the rest of the Cosmos
ecosystem!
## Next {hide}
Learn about Ethermint's [architecture](./architectures.md) {hide}

10573
docs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
docs/package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "docs",
"version": "1.0.0",
"description": "Ethermint Documentation",
"main": "index.js",
"scripts": {
"preserve": "./pre.sh",
"serve": "trap 'exit 0' SIGINT; vuepress dev --no-cache",
"postserve": "./post.sh",
"prebuild": "./pre.sh",
"build": "trap 'exit 0' SIGINT; vuepress build --no-cache",
"postbuild": "./post.sh"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"vuepress-theme-cosmos": "^1.0.168"
},
"devDependencies": {
"watchpack": "^1.7.2"
}
}

4
docs/post.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Modules
rm -rf modules

12
docs/pre.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
mkdir -p modules
for D in ../x/*; do
if [ -d "${D}" ]; then
rm -rf "modules/$(echo $D | awk -F/ '{print $NF}')"
mkdir -p "modules/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
fi
done
cat ../x/README.md | sed 's/\.\/x/\/modules/g' | sed 's/spec\/README.md//g'

17
docs/quickstart/README.md Normal file
View File

@ -0,0 +1,17 @@
<!--
order: false
parent:
order: 2
-->
# Quick Start
This repository contains reference documentation on the basic concepts of Ethermint.
1. [Run a Node](./run_node.md)
After going throught the Quick Start contents, head over to the [basics](./../basics/README.md) to learn more.
## Next {hide}
Learn how to run an Ethermint [node](./../quickstart/run_node.md) {hide}

View File

@ -0,0 +1,85 @@
<!--
order: 1
-->
# Run a Node
Run a local node and start the REST and JSON-RPC clients {synopsis}
Clone and build Ethermint:
```bash
git clone <https://github.com/ChainSafe/ethermint>
cd ethermint
make install
```
Run the local testnet node with faucet enabled:
::: warning
The script below will remove any pre-existing binaries installed
:::
```bash
./init.sh
```
In another terminal window or tab, run the Ethereum JSON-RPC server as well as the SDK REST server:
```bash
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 8
```
## Key Management
To run a node with the same key every time:
replace `emintcli keys add $KEY` in `./init.sh` with:
```bash
echo "your mnemonic here" | emintcli keys add ethermintkey --recover
```
::: tip
Ethermint currently only supports 24 word mnemonics.
:::
You can generate a new key/mnemonic with
```bash
emintcli keys add <mykey>
```
To export your ethermint key as an ethereum private key (for use with Metamask for example):
```bash
emintcli keys unsafe-export-eth-key <mykey>
```
## Requesting tokens though the testnet faucet
Once the ethermint daemon is up and running, you can request tokens to your address using the `faucet` module:
```bash
# query your initial balance
emintcli q bank balances $(emintcli keys show <mykey> -a)
# send a tx to request tokens to your account address
emintcli tx faucet request 100photon --from <mykey>
# query your balance after the request
emintcli q bank balances $(emintcli keys show <mykey> -a)
```
You can also check to total amount funded by the faucet and the total supply of the chain via:
```bash
# total amount funded by the faucet
emintcli q faucet funded
# total supply
emintcli q supply total
```
## Next {hide}
Learn about Ethermint [accounts](./../basic/accounts.md) {hide}

View File

@ -1,3 +0,0 @@
# EVM
TODO

View File

@ -1,45 +0,0 @@
# Transactions
> NOTE: The specification documented below is still highly active in development
and subject to change.
## Routing
Ethermint needs to parse and handle transactions routed for both the EVM and for
the Cosmos hub. We attempt to achieve this by mimicking
[Geth's](https://github.com/ethereum/go-ethereum) `Transaction` structure and
treat it as a unique Cosmos SDK message type. An Ethereum transaction is a single
[`sdk.Msg`](https://godoc.org/github.com/cosmos/cosmos-sdk/types#Msg) contained
in an [`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx).
All relevant Ethereum transaction information is contained in this message. This
includes the signature, gas, payload, etc.
Being that Ethermint implements the Tendermint ABCI application interface, as
transactions are consumed, they are passed through a series of handlers. Once such
handler, the `AnteHandler`, is responsible for performing preliminary message
execution business logic such as fee payment, signature verification, etc. This is
particular to Cosmos SDK routed transactions. Ethereum routed transactions will
bypass this as the EVM handles the same business logic.
Ethereum routed transactions coming from a web3 source are expected to be RLP
encoded, however all internal interaction between Ethermint and Tendermint will
utilize Amino encoding.
__Note__: Our goal is to utilize Geth/Turbo-Geth as a library, at least as much
as possible, so it should be expected that these types and the operations you may
perform on them will keep in line with Ethereum (e.g. signature algorithms and
gas/fees). In addition, we aim to have existing tooling and frameworks in the
Ethereum ecosystem have 100% compatibility with creating transactions in Ethermint.
## Signatures
Ethermint supports [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)
signatures. A `Transaction` is expected to have a single signature for Ethereum
routed transactions. However, just as in Cosmos, Ethermint will support multiple
signers for non-Ethereum transactions. Signatures over the
`Transaction` type are identical to Ethereum and the signatures will not be duplicated
in the embedding [`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx).
## Gas & Fees
TODO

16
x/evm/spec/README.md Normal file
View File

@ -0,0 +1,16 @@
<!--
order: 0
title: EVM Overview
parent:
title: "evm"
-->
# `evm`
## Abstract
<!-- TODO: -->
## Content
<!-- TODO: -->