Skip to content

Commit

Permalink
Merge pull request #9 from alexiscolin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored Jun 23, 2023
2 parents b2d82e8 + 7723250 commit 5742032
Show file tree
Hide file tree
Showing 80 changed files with 2,111 additions and 256 deletions.
178 changes: 178 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,179 @@
*.sw[op]

# Created by https://www.toptal.com/developers/gitignore/api/macos,node
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,node

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

# End of https://www.toptal.com/developers/gitignore/api/macos,node
63 changes: 56 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func main() {
app.Router.Handle("/", handlerHome(app))
app.Router.Handle("/about", handlerAbout(app))
app.Router.Handle("/game-of-realms", handlerGor(app))
app.Router.Handle("/events", handlerEvents(app))
app.Router.Handle("/gnolang", handlerLanguage(app))
app.Router.Handle("/ecosystem", handlerEcosystem(app))
app.Router.Handle("/r/{path:.*}", handlerRedirect(app))
app.Router.Handle("/p/{path:.*}", handlerRedirect(app))
app.Router.Handle("/static/{path:.+}", handlerStaticFile(app))
Expand All @@ -54,13 +57,16 @@ func main() {
}
}


func handlerHome(app gotuna.App) http.Handler {
md := filepath.Join(flags.pagesDir, "HOME.md")
mainContent := osm.MustReadFile(md)
homeContent := osm.MustReadFile(md)

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("MainContent", string(mainContent)).
Set("Title", "Gno.land Smart Contract Platform Using Gnolang (Gno)").
Set("Description", "Gno.land is the only smart contract platform using the Gnolang (Gno) programming language, an interpretation of the widely-used Golang (Go).").
Set("HomeContent", string(homeContent)).
Render(w, r, "home.html", "funcs.html")
})
}
Expand All @@ -71,8 +77,51 @@ func handlerAbout(app gotuna.App) http.Handler {

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("Title", "Gno.land Is A Platform To Write Smart Contracts In Gnolang (Gno)").
Set("Description", "On Gno.land, developers write smart contracts and other blockchain apps using Gnolang (Gno) without learning a language that’s exclusive to a single ecosystem.").
Set("MainContent", string(mainContent)).
Render(w, r, "generic.html", "funcs.html")
})
}

func handlerEvents(app gotuna.App) http.Handler {
md := filepath.Join(flags.pagesDir, "EVENTS.md")
mainContent := osm.MustReadFile(md)

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("Title", "Gno.land Core Team Attends Industry Events & Meetups").
Set("Description", " If you’re interested in learning more about Gno.land, you can join us at major blockchain industry events throughout the year either in person or virtually.").
Set("MainContent", string(mainContent)).
Render(w, r, "about.html", "funcs.html")
Render(w, r, "generic.html", "funcs.html")
})
}



func handlerLanguage(app gotuna.App) http.Handler {
md := filepath.Join(flags.pagesDir, "LANGUAGE.md")
mainContent := osm.MustReadFile(md)

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("Title", "Gnolang (Gno) Is a Complete Language for Blockchain").
Set("Description", "Gnolang (Gno) is an interpretation of the popular Golang (Go) language for blockchain created by Tendermint and Cosmos founder Jae Kwon.").
Set("MainContent", string(mainContent)).
Render(w, r, "generic.html", "funcs.html")
})
}

func handlerEcosystem(app gotuna.App) http.Handler {
md := filepath.Join(flags.pagesDir, "ECOSYSTEM.md")
mainContent := osm.MustReadFile(md)

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("Title", "Discover Gno.land Ecosystem Projects & Initiatives").
Set("Description", "Dive further into the Gno.land ecosystem and discover the core infrastructure, projects, smart contracts, and tooling we’re building.").
Set("MainContent", string(mainContent)).
Render(w, r, "generic.html", "funcs.html")
})
}

Expand All @@ -83,7 +132,9 @@ func handlerGor(app gotuna.App) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
app.NewTemplatingEngine().
Set("MainContent", string(mainContent)).
Render(w, r, "gor.html", "funcs.html")
Set("Title", "Game of Realms Content For The Best Contributors ").
Set("Description", "Game of Realms is the first high-stakes competition held in two phases to find the best contributors to the Gno.land platform with a 133,700 ATOM prize pool.").
Render(w, r, "generic.html", "funcs.html")
})
}

Expand Down Expand Up @@ -133,15 +184,13 @@ func handlerFavicon(app gotuna.App) http.Handler {
io.Copy(w, f)
})
}

func handleNotFound(app gotuna.App, path string, w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
app.NewTemplatingEngine().
Set("title", "Not found").
Set("path", path).
Render(w, r, "404.html", "header.html")
Render(w, r, "404.html", "funcs.html")
}

func writeError(w http.ResponseWriter, err error) {
w.WriteHeader(500)
w.Write([]byte(err.Error()))
Expand Down
8 changes: 4 additions & 4 deletions pages/ABOUT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# About Gno.land

Gno.land is platform to write smart contracts in Gnolang (Gno).
Gno.land is a platform to write smart contracts in Gnolang (Gno).
Using an interpreted version of the general-purpose programming language Golang (Go), developers can write smart contracts and other blockchain apps without having to learn a language that’s exclusive to a single ecosystem.
Web2 developers can easily contribute to web3 and start building a more transparent accountable world.
Web2 developers can easily contribute to web3 and start building a more transparent, accountable world.

The Gno transaction token GNOT and the contributor memberships power the platform, which runs on a variation of Proof of Stake.
Proof of Contribution rewards contributors from technical and non-technical backgrounds fairly with GNOT.
The Gno transaction token, GNOT, and the contributor memberships power the platform, which runs on a variation of Proof of Stake.
Proof of Contribution rewards contributors from technical and non-technical backgrounds, fairly and for life with GNOT.
This consensus mechanism also achieves higher security with fewer validators, optimizing resources for a greener, more sustainable, and enduring blockchain ecosystem.

Any blockchain using Gnolang achieves succinctness, composability, expressivity, and completeness not found in any other smart contract platform.
Expand Down
25 changes: 25 additions & 0 deletions pages/ECOSYSTEM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Gno Ecosystem

## Gno.land Space

For the best onboarding experience, head over to [Gno.land Space](https://www.gnoland.space/) open ecosystem. Here you can set up your Gno wallet, explore existing community-written Gno smart contracts (realms), and become part of our vibrant community by joining [Gno.land Discord](https://discord.com/invite/x76qK4ttHC).

## Gno Studio (IDE)

Gno IDE is a web-based application helping builders quickly spin up Gno realms and packages right on their browsers. Offering a smooth and intuitive UX for building on Gno, you’ll find multiple modes for customizability with all the features you’d expect from an IDE, such as auto compilation in the editor, debugging, and extensive testing capability.

## Gnoscan

Developed by the Onbloc team, Gnoscan is Gno.land’s blockchain explorer. Anyone can use Gnoscan to easily find information that resides on the Gno.land blockchain, such as wallet addresses, TX hashes, blocks, and contracts. Gnoscan makes our on-chain data easy to read and intuitive to discover. [Go to Gnoscan.](https://gnoscan.io/)

## Adena

Adena is a user-friendly non-custodial wallet for Gno.land. Open-source and developed by Onbloc, Adena currently powers all transactions on Gno.land, allowing gnomes to interact easily with the chain. With an emphasis on UX, Adena is built to handle millions of realms and tokens with a high-quality interface, support for NFTs and custom tokens, and seamless integration. [Get started here.](https://adena.app/)

## Gnoswap

Gnoswap is currently under development and led by the Onbloc team. Gnoswap will be the first DEX on Gno.land and is an automated market maker (AMM) protocol written in Gnolang that allows for permissionless token exchanges on the platform.

## Gno.land Developer Portal

Through the Gno.land Developer Portal, new developers can explore the exciting world of Gnolang (Gno), a novel programming language that powers the Gno.land blockchain. If you want to interact with Gno.land, start writing a realm, build a dApp, or even port a Solidity contract to a Gnolang realm, you’ll find the resources to [get started here](https://docs.onbloc.xyz/).
Loading

0 comments on commit 5742032

Please sign in to comment.