Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Gno
run: |
curl --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/gnolang/gno/master/misc/install.sh \
| sh -s -- --from-source
echo "$HOME/.gno/bin" >> "$GITHUB_PATH"

- name: Test
run: gno test .

- name: Lint
run: gno lint .
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.PHONY: install dev test

install:
curl -sSL https://raw.githubusercontent.com/gnolang/gno/master/misc/install.sh | bash

# --from-source is required: the installer's prebuilt-binary mode looks for
# v* release tags, and gnolang/gno only publishes chain/* tags today.
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/gnolang/gno/master/misc/install.sh | sh -s -- --from-source
@echo '>> binaries are in $$HOME/.gno/bin — add it to your PATH:'
@echo ' export PATH="$$HOME/.gno/bin:$$PATH"'

dev:
gnodev .

Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ check out the "Next Steps" section below for links to more advanced resources.

make install

This will check if Go is installed and install the required Gno tools.
This clones `gnolang/gno` and builds `gno`, `gnokey`, `gnodev`, `gnobro` and
`gnoweb` into `$HOME/.gno/bin`. It needs Go, git and make, and takes a few
minutes the first time. Add the directory to your `PATH` before continuing:

export PATH="$HOME/.gno/bin:$PATH"

(The installer also has a faster prebuilt-binary mode, but it currently looks
for `v*` release tags and `gnolang/gno` only publishes `chain/*` tags, so
`--from-source` is the path that works today.)

3. Start the development server:

make dev

4. Open your browser and visit https://localhost:8888
4. Open your browser and visit http://localhost:8888

## What's Included

Expand All @@ -33,6 +41,19 @@ This repository contains a simple Gno realm with:
- A `Set` function to update the realm's state
- A `Get` function to retrieve the stored message

## Deploying it

`gnodev` runs a throwaway local chain. When you want your realm on a real
network:

- **A testnet** — start here. Testnets are renamed and replaced every few
weeks, so look up the current one and its RPC endpoint in
[Gno networks](https://docs.gno.land/resources/gnoland-networks), and get
tokens from the [faucet](https://faucet.gno.land).
- **[Mainnet](https://gno.land)** (`gnoland-1`,
`https://rpc.gno.land:443`) has been live since 12 September 2026. Real
GNOT, no faucet.

## Next Steps

Ready to learn more? Check out these resources:
Expand Down
2 changes: 1 addition & 1 deletion hello.gno
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Try it out with gnokey:
gnokey add myaccount
gnokey list

[And click here](/r/demo/hello$help&func=Set&newMsg=Hello%20from%20Gnokey!)
[And click here](/r/example/hello$help&func=Set&newMsg=Hello%20from%20Gnokey!)
`
}

Expand Down
4 changes: 2 additions & 2 deletions hello_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"testing"
)

func TestSetAndGet(t *testing.T) {
func TestSetAndGet(cur realm, t *testing.T) {
// Test initial state
if got := Get(); got != "Hello, Gno!" {
t.Errorf("Expected default message, got %s", got)
}

// Test setting a new message
Set(cross, "Hello, Test!")
Set(cross(cur), "Hello, Test!")
if got := Get(); got != "Hello, Test!" {
t.Errorf("Expected 'Hello, Test!', got %s", got)
}
Expand Down
Loading